From be12b03194db74ceb82924aac39c9ca75d02cbc1 Mon Sep 17 00:00:00 2001 From: azure-powershell-bot <65331932+azure-powershell-bot@users.noreply.github.com> Date: Wed, 12 Apr 2023 06:25:34 +0000 Subject: [PATCH 1/2] Move Aks to main --- src/Aks/Aks.Autorest/Az.Aks.format.ps1xml | 3472 ++++++-- src/Aks/Aks.Autorest/Az.Aks.psd1 | 2 +- src/Aks/Aks.Autorest/README.md | 22 +- src/Aks/Aks.Autorest/build-module.ps1 | 6 +- src/Aks/Aks.Autorest/create-model-cmdlets.ps1 | 12 +- .../custom/Install-AzAksCliTool.ps1 | 2 +- .../New-AzAksTimeInWeekObject.ps1 | 54 + .../New-AzAksTimeSpanObject.ps1 | 53 + src/Aks/Aks.Autorest/docs/Az.Aks.md | 63 +- .../docs/Get-AzAksMaintenanceConfiguration.md | 209 + .../Get-AzAksManagedClusterCommandResult.md | 195 + .../docs/Get-AzAksManagedClusterOSOption.md | 157 + ...lusterOutboundNetworkDependencyEndpoint.md | 124 + .../docs/Get-AzAksNodePoolUpgradeProfile.md | 21 +- .../Aks.Autorest/docs/Get-AzAksSnapshot.md | 212 + .../docs/Get-AzAksUpgradeProfile.md | 21 +- src/Aks/Aks.Autorest/docs/Get-AzAksVersion.md | 2 +- ...voke-AzAksAbortAgentPoolLatestOperation.md | 250 + ...AzAksAbortManagedClusterLatestOperation.md | 235 + ...eManagedClusterServiceAccountSigningKey.md | 229 + .../docs/New-AzAksMaintenanceConfiguration.md | 210 + .../Aks.Autorest/docs/New-AzAksSnapshot.md | 211 + .../docs/New-AzAksTimeInWeekObject.md | 87 + .../docs/New-AzAksTimeSpanObject.md | 86 + .../Remove-AzAksMaintenanceConfiguration.md | 221 + .../Aks.Autorest/docs/Remove-AzAksSnapshot.md | 206 + .../Aks.Autorest/docs/Start-AzAksCluster.md | 19 +- .../docs/Start-AzAksManagedClusterCommand.md | 298 + .../Aks.Autorest/docs/Stop-AzAksCluster.md | 25 +- .../Get-AzAksMaintenanceConfiguration.md | 44 + .../Get-AzAksManagedClusterCommandResult.md | 19 + .../Get-AzAksManagedClusterOSOption.md | 12 + ...lusterOutboundNetworkDependencyEndpoint.md | 18 + .../Get-AzAksNodePoolUpgradeProfile.md | 2 + .../examples/Get-AzAksSnapshot.md | 50 + .../examples/Get-AzAksUpgradeProfile.md | 2 + .../Aks.Autorest/examples/Get-AzAksVersion.md | 3 +- ...voke-AzAksAbortAgentPoolLatestOperation.md | 8 + ...AzAksAbortManagedClusterLatestOperation.md | 8 + ...eManagedClusterServiceAccountSigningKey.md | 6 + .../New-AzAksMaintenanceConfiguration.md | 16 + .../examples/New-AzAksSnapshot.md | 16 + .../examples/New-AzAksTimeInWeekObject.md | 14 + .../examples/New-AzAksTimeSpanObject.md | 16 + .../Remove-AzAksMaintenanceConfiguration.md | 12 + .../examples/Remove-AzAksSnapshot.md | 12 + .../examples/Start-AzAksCluster.md | 2 + .../Start-AzAksManagedClusterCommand.md | 40 + .../examples/Stop-AzAksCluster.md | 1 + .../Get-AzAksMaintenanceConfiguration.ps1 | 221 + .../Get-AzAksManagedClusterCommandResult.ps1 | 216 + .../Get-AzAksManagedClusterOSOption.ps1 | 203 + ...usterOutboundNetworkDependencyEndpoint.ps1 | 181 + .../Get-AzAksNodePoolUpgradeProfile.ps1 | 25 +- .../exports/Get-AzAksSnapshot.ps1 | 217 + .../exports/Get-AzAksUpgradeProfile.ps1 | 25 +- .../Aks.Autorest/exports/Get-AzAksVersion.ps1 | 2 +- .../exports/Install-AzAksCliTool.ps1 | 2 +- ...oke-AzAksAbortAgentPoolLatestOperation.ps1 | 232 + ...zAksAbortManagedClusterLatestOperation.ps1 | 226 + ...ManagedClusterServiceAccountSigningKey.ps1 | 222 + .../New-AzAksMaintenanceConfiguration.ps1 | 214 + .../exports/New-AzAksSnapshot.ps1 | 206 + .../exports/New-AzAksTimeInWeekObject.ps1 | 122 + .../exports/New-AzAksTimeSpanObject.ps1 | 121 + .../exports/ProxyCmdletDefinitions.ps1 | 3229 +++++++- .../Remove-AzAksMaintenanceConfiguration.ps1 | 219 + .../exports/Remove-AzAksSnapshot.ps1 | 213 + .../exports/Start-AzAksCluster.ps1 | 21 +- .../Start-AzAksManagedClusterCommand.ps1 | 241 + .../exports/Stop-AzAksCluster.ps1 | 27 +- src/Aks/Aks.Autorest/generate-info.json | 8 +- src/Aks/Aks.Autorest/generated/api/Aks.cs | 7139 ++++++++++++----- ...ationAcceptedResponseHeaders.PowerShell.cs | 155 + ...onAcceptedResponseHeaders.TypeConverter.cs | 153 + ...tLatestOperationAcceptedResponseHeaders.cs | 77 + ...stOperationAcceptedResponseHeaders.json.cs | 108 + ...eleteAcceptedResponseHeaders.PowerShell.cs | 145 + ...teAcceptedResponseHeaders.TypeConverter.cs | 151 + ...AgentPoolsDeleteAcceptedResponseHeaders.cs | 55 + ...oolsDeleteAcceptedResponseHeaders.json.cs} | 24 +- .../api/Models/AksIdentity.PowerShell.cs | 32 +- .../generated/api/Models/AksIdentity.cs | 67 +- .../generated/api/Models/AksIdentity.json.cs | 8 +- .../Api20200901/AgentPool.PowerShell.cs | 392 - .../api/Models/Api20200901/AgentPool.cs | 540 -- .../Api20200901/AgentPoolUpgradeSettings.cs | 57 - .../BaseManagedCluster.PowerShell.cs | 774 -- .../Models/Api20200901/BaseManagedCluster.cs | 1181 --- .../ContainerServiceDiagnosticsProfile.cs | 77 - ...ontainerServiceMasterProfile.PowerShell.cs | 200 - .../ContainerServiceMasterProfile.cs | 197 - .../ContainerServiceNetworkProfile.cs | 349 - .../ContainerServiceVMDiagnostics.cs | 71 - .../Api20200901/ManagedCluster.PowerShell.cs | 840 -- .../api/Models/Api20200901/ManagedCluster.cs | 507 -- .../ManagedClusterAccessProfile.cs | 107 - ...nagedClusterAgentPoolProfile.PowerShell.cs | 368 - .../ManagedClusterAgentPoolProfile.cs | 221 - ...erAgentPoolProfileProperties.PowerShell.cs | 365 - ...anagedClusterAgentPoolProfileProperties.cs | 574 -- .../ManagedClusterApiServerAccessProfile.cs | 68 - ...edClusterIdentityUserAssignedIdentities.cs | 42 - ...erLoadBalancerProfileManagedOutboundIPs.cs | 62 - .../ManagedClusterProperties.PowerShell.cs | 728 -- .../Api20200901/ManagedClusterProperties.cs | 1162 --- ...edClusterPropertiesIdentityProfileValue.cs | 64 - .../ManagedClusterWindowsProfile.cs | 121 - .../api/Models/Api20200901/Resource.cs | 128 - .../api/Models/Api20200901/ResourceTags.cs | 35 - .../AccessProfile.PowerShell.cs | 24 +- .../AccessProfile.TypeConverter.cs | 6 +- .../AccessProfile.cs | 6 +- .../AccessProfile.json.cs | 8 +- .../Api20230201/AgentPool.PowerShell.cs | 648 ++ .../AgentPool.TypeConverter.cs | 6 +- .../api/Models/Api20230201/AgentPool.cs | 1177 +++ .../AgentPool.json.cs | 12 +- .../AgentPoolAvailableVersions.PowerShell.cs | 40 +- ...gentPoolAvailableVersions.TypeConverter.cs | 6 +- .../AgentPoolAvailableVersions.cs | 52 +- .../AgentPoolAvailableVersions.json.cs | 10 +- ...lAvailableVersionsProperties.PowerShell.cs | 24 +- ...ailableVersionsProperties.TypeConverter.cs | 6 +- .../AgentPoolAvailableVersionsProperties.cs | 16 +- ...entPoolAvailableVersionsProperties.json.cs | 10 +- ...pertiesAgentPoolVersionsItem.PowerShell.cs | 32 +- ...tiesAgentPoolVersionsItem.TypeConverter.cs | 6 +- ...VersionsPropertiesAgentPoolVersionsItem.cs | 14 +- ...onsPropertiesAgentPoolVersionsItem.json.cs | 8 +- .../AgentPoolListResult.PowerShell.cs | 28 +- .../AgentPoolListResult.TypeConverter.cs | 6 +- .../AgentPoolListResult.cs | 18 +- .../AgentPoolListResult.json.cs | 10 +- .../AgentPoolUpgradeProfile.PowerShell.cs | 52 +- .../AgentPoolUpgradeProfile.TypeConverter.cs | 6 +- .../AgentPoolUpgradeProfile.cs | 92 +- .../AgentPoolUpgradeProfile.json.cs | 10 +- ...PoolUpgradeProfileProperties.PowerShell.cs | 36 +- ...lUpgradeProfileProperties.TypeConverter.cs | 6 +- .../AgentPoolUpgradeProfileProperties.cs | 46 +- .../AgentPoolUpgradeProfileProperties.json.cs | 10 +- ...rofilePropertiesUpgradesItem.PowerShell.cs | 28 +- ...ilePropertiesUpgradesItem.TypeConverter.cs | 6 +- ...oolUpgradeProfilePropertiesUpgradesItem.cs | 22 +- ...gradeProfilePropertiesUpgradesItem.json.cs | 8 +- .../AgentPoolUpgradeSettings.PowerShell.cs | 24 +- .../AgentPoolUpgradeSettings.TypeConverter.cs | 6 +- .../Api20230201/AgentPoolUpgradeSettings.cs | 63 + .../AgentPoolUpgradeSettings.json.cs | 8 +- .../AzureKeyVaultKms.PowerShell.cs} | 128 +- .../AzureKeyVaultKms.TypeConverter.cs | 147 + .../Models/Api20230201/AzureKeyVaultKms.cs | 135 + .../Api20230201/AzureKeyVaultKms.json.cs | 114 + .../CloudError.PowerShell.cs | 40 +- .../CloudError.TypeConverter.cs | 6 +- .../CloudError.cs | 28 +- .../CloudError.json.cs | 10 +- .../CloudErrorBody.PowerShell.cs | 36 +- .../CloudErrorBody.TypeConverter.cs | 6 +- .../CloudErrorBody.cs | 16 +- .../CloudErrorBody.json.cs | 10 +- .../CommandResultProperties.PowerShell.cs | 184 + .../CommandResultProperties.TypeConverter.cs | 147 + .../Api20230201/CommandResultProperties.cs | 154 + .../CommandResultProperties.json.cs | 136 + ...ContainerServiceLinuxProfile.PowerShell.cs | 32 +- ...tainerServiceLinuxProfile.TypeConverter.cs | 6 +- .../ContainerServiceLinuxProfile.cs | 34 +- .../ContainerServiceLinuxProfile.json.cs | 10 +- ...ntainerServiceNetworkProfile.PowerShell.cs | 192 +- ...inerServiceNetworkProfile.TypeConverter.cs | 6 +- .../ContainerServiceNetworkProfile.cs | 590 ++ .../ContainerServiceNetworkProfile.json.cs | 46 +- ...ainerServiceSshConfiguration.PowerShell.cs | 24 +- ...erServiceSshConfiguration.TypeConverter.cs | 6 +- .../ContainerServiceSshConfiguration.cs | 24 +- .../ContainerServiceSshConfiguration.json.cs | 10 +- ...ContainerServiceSshPublicKey.PowerShell.cs | 24 +- ...tainerServiceSshPublicKey.TypeConverter.cs | 6 +- .../ContainerServiceSshPublicKey.cs | 6 +- .../ContainerServiceSshPublicKey.json.cs | 8 +- .../Api20230201/CreationData.PowerShell.cs | 144 + .../CreationData.TypeConverter.cs} | 30 +- .../api/Models/Api20230201/CreationData.cs | 51 + .../Models/Api20230201/CreationData.json.cs | 108 + .../CredentialResult.PowerShell.cs | 28 +- .../CredentialResult.TypeConverter.cs | 6 +- .../CredentialResult.cs | 10 +- .../CredentialResult.json.cs | 8 +- .../CredentialResults.PowerShell.cs | 28 +- .../CredentialResults.TypeConverter.cs | 6 +- .../CredentialResults.cs | 24 +- .../CredentialResults.json.cs | 12 +- .../EndpointDependency.PowerShell.cs | 152 + .../EndpointDependency.TypeConverter.cs} | 30 +- .../Models/Api20230201/EndpointDependency.cs | 68 + .../Api20230201/EndpointDependency.json.cs | 118 + .../EndpointDetail.PowerShell.cs} | 84 +- .../EndpointDetail.TypeConverter.cs | 147 + .../api/Models/Api20230201/EndpointDetail.cs | 102 + .../Models/Api20230201/EndpointDetail.json.cs | 114 + .../ExtendedLocation.PowerShell.cs | 152 + .../ExtendedLocation.TypeConverter.cs | 147 + .../Models/Api20230201/ExtendedLocation.cs | 68 + .../Api20230201/ExtendedLocation.json.cs | 110 + .../Api20230201/KubeletConfig.PowerShell.cs | 226 + .../KubeletConfig.TypeConverter.cs | 147 + .../api/Models/Api20230201/KubeletConfig.cs | 262 + .../Models/Api20230201/KubeletConfig.json.cs | 138 + .../Api20230201/LinuxOSConfig.PowerShell.cs | 170 + .../LinuxOSConfig.TypeConverter.cs | 147 + .../api/Models/Api20230201/LinuxOSConfig.cs | 119 + .../Models/Api20230201/LinuxOSConfig.json.cs | 116 + .../MaintenanceConfiguration.PowerShell.cs | 244 + .../MaintenanceConfiguration.TypeConverter.cs | 147 + .../Api20230201/MaintenanceConfiguration.cs | 223 + .../MaintenanceConfiguration.json.cs | 118 + ...nanceConfigurationListResult.PowerShell.cs | 156 + ...eConfigurationListResult.TypeConverter.cs} | 30 +- .../MaintenanceConfigurationListResult.cs | 71 + ...MaintenanceConfigurationListResult.json.cs | 122 + ...nanceConfigurationProperties.PowerShell.cs | 156 + ...ceConfigurationProperties.TypeConverter.cs | 149 + .../MaintenanceConfigurationProperties.cs | 74 + ...MaintenanceConfigurationProperties.json.cs | 127 + .../Api20230201/ManagedCluster.PowerShell.cs | 1272 +++ .../ManagedCluster.TypeConverter.cs | 6 +- .../api/Models/Api20230201/ManagedCluster.cs | 2087 +++++ .../ManagedCluster.json.cs | 22 +- .../ManagedClusterAadProfile.PowerShell.cs | 54 +- .../ManagedClusterAadProfile.TypeConverter.cs | 6 +- .../ManagedClusterAadProfile.cs | 64 +- .../ManagedClusterAadProfile.json.cs | 12 +- .../ManagedClusterAccessProfile.PowerShell.cs | 248 + ...nagedClusterAccessProfile.TypeConverter.cs | 6 +- .../ManagedClusterAccessProfile.cs | 144 + .../ManagedClusterAccessProfile.json.cs | 14 +- .../ManagedClusterAddonProfile.PowerShell.cs | 44 +- ...anagedClusterAddonProfile.TypeConverter.cs | 6 +- .../ManagedClusterAddonProfile.cs | 54 +- .../ManagedClusterAddonProfile.json.cs | 12 +- ...gedClusterAddonProfileConfig.PowerShell.cs | 20 +- ...ClusterAddonProfileConfig.TypeConverter.cs | 6 +- .../ManagedClusterAddonProfileConfig.cs | 6 +- ...gedClusterAddonProfileConfig.dictionary.cs | 4 +- .../ManagedClusterAddonProfileConfig.json.cs | 8 +- ...dClusterAddonProfileIdentity.PowerShell.cs | 32 +- ...usterAddonProfileIdentity.TypeConverter.cs | 6 +- .../ManagedClusterAddonProfileIdentity.cs | 26 +- ...ManagedClusterAddonProfileIdentity.json.cs | 10 +- ...nagedClusterAgentPoolProfile.PowerShell.cs | 616 ++ ...edClusterAgentPoolProfile.TypeConverter.cs | 6 +- .../ManagedClusterAgentPoolProfile.cs | 410 + .../ManagedClusterAgentPoolProfile.json.cs | 10 +- ...erAgentPoolProfileProperties.PowerShell.cs | 613 ++ ...gentPoolProfileProperties.TypeConverter.cs | 6 +- ...anagedClusterAgentPoolProfileProperties.cs | 1248 +++ ...dClusterAgentPoolProfileProperties.json.cs | 54 +- ...lProfilePropertiesNodeLabels.PowerShell.cs | 24 +- ...ofilePropertiesNodeLabels.TypeConverter.cs | 6 +- ...terAgentPoolProfilePropertiesNodeLabels.cs | 12 +- ...lProfilePropertiesNodeLabels.dictionary.cs | 4 +- ...entPoolProfilePropertiesNodeLabels.json.cs | 10 +- ...entPoolProfilePropertiesTags.PowerShell.cs | 24 +- ...PoolProfilePropertiesTags.TypeConverter.cs | 6 +- ...edClusterAgentPoolProfilePropertiesTags.cs | 12 +- ...entPoolProfilePropertiesTags.dictionary.cs | 4 +- ...sterAgentPoolProfilePropertiesTags.json.cs | 10 +- ...lusterApiServerAccessProfile.PowerShell.cs | 52 +- ...terApiServerAccessProfile.TypeConverter.cs | 6 +- .../ManagedClusterApiServerAccessProfile.cs | 146 + ...nagedClusterApiServerAccessProfile.json.cs | 14 +- ...gedClusterAutoUpgradeProfile.PowerShell.cs | 146 + ...ClusterAutoUpgradeProfile.TypeConverter.cs | 148 + .../ManagedClusterAutoUpgradeProfile.cs | 57 + .../ManagedClusterAutoUpgradeProfile.json.cs | 108 + ...edClusterAzureMonitorProfile.PowerShell.cs | 180 + ...lusterAzureMonitorProfile.TypeConverter.cs | 148 + .../ManagedClusterAzureMonitorProfile.cs | 131 + .../ManagedClusterAzureMonitorProfile.json.cs | 108 + ...nitorProfileKubeStateMetrics.PowerShell.cs | 161 + ...orProfileKubeStateMetrics.TypeConverter.cs | 153 + ...sterAzureMonitorProfileKubeStateMetrics.cs | 93 + ...zureMonitorProfileKubeStateMetrics.json.cs | 116 + ...erAzureMonitorProfileMetrics.PowerShell.cs | 179 + ...zureMonitorProfileMetrics.TypeConverter.cs | 151 + ...anagedClusterAzureMonitorProfileMetrics.cs | 134 + ...dClusterAzureMonitorProfileMetrics.json.cs | 116 + ...anagedClusterHttpProxyConfig.PowerShell.cs | 168 + ...edClusterHttpProxyConfig.TypeConverter.cs} | 30 +- .../ManagedClusterHttpProxyConfig.cs | 102 + .../ManagedClusterHttpProxyConfig.json.cs | 122 + .../ManagedClusterIdentity.PowerShell.cs | 36 +- .../ManagedClusterIdentity.TypeConverter.cs | 6 +- .../ManagedClusterIdentity.cs | 45 +- .../ManagedClusterIdentity.json.cs | 10 +- ...entityUserAssignedIdentities.PowerShell.cs | 26 +- ...ityUserAssignedIdentities.TypeConverter.cs | 6 +- ...edClusterIdentityUserAssignedIdentities.cs | 39 + ...entityUserAssignedIdentities.dictionary.cs | 26 +- ...sterIdentityUserAssignedIdentities.json.cs | 15 +- .../ManagedClusterListResult.PowerShell.cs | 28 +- .../ManagedClusterListResult.TypeConverter.cs | 6 +- .../ManagedClusterListResult.cs | 18 +- .../ManagedClusterListResult.json.cs | 10 +- ...edClusterLoadBalancerProfile.PowerShell.cs | 72 +- ...lusterLoadBalancerProfile.TypeConverter.cs | 6 +- .../ManagedClusterLoadBalancerProfile.cs | 134 +- .../ManagedClusterLoadBalancerProfile.json.cs | 18 +- ...cerProfileManagedOutboundIPs.PowerShell.cs | 32 +- ...ProfileManagedOutboundIPs.TypeConverter.cs | 6 +- ...erLoadBalancerProfileManagedOutboundIPs.cs | 88 + ...dBalancerProfileManagedOutboundIPs.json.cs | 10 +- ...cerProfileOutboundIPPrefixes.PowerShell.cs | 24 +- ...ProfileOutboundIPPrefixes.TypeConverter.cs | 6 +- ...erLoadBalancerProfileOutboundIPPrefixes.cs | 16 +- ...dBalancerProfileOutboundIPPrefixes.json.cs | 10 +- ...adBalancerProfileOutboundIPs.PowerShell.cs | 24 +- ...alancerProfileOutboundIPs.TypeConverter.cs | 6 +- ...edClusterLoadBalancerProfileOutboundIPs.cs | 16 +- ...sterLoadBalancerProfileOutboundIPs.json.cs | 10 +- ...sterManagedOutboundIPProfile.PowerShell.cs | 149 + ...rManagedOutboundIPProfile.TypeConverter.cs | 151 + .../ManagedClusterManagedOutboundIPProfile.cs | 60 + ...gedClusterManagedOutboundIPProfile.json.cs | 109 + ...agedClusterNatGatewayProfile.PowerShell.cs | 170 + ...dClusterNatGatewayProfile.TypeConverter.cs | 148 + .../ManagedClusterNatGatewayProfile.cs | 112 + .../ManagedClusterNatGatewayProfile.json.cs | 120 + ...gedClusterOidcIssuerProfile.PowerShell.cs} | 106 +- ...dClusterOidcIssuerProfile.TypeConverter.cs | 148 + .../ManagedClusterOidcIssuerProfile.cs | 71 + .../ManagedClusterOidcIssuerProfile.json.cs | 113 + .../ManagedClusterPodIdentity.PowerShell.cs | 256 + ...ManagedClusterPodIdentity.TypeConverter.cs | 147 + .../Api20230201/ManagedClusterPodIdentity.cs | 254 + .../ManagedClusterPodIdentity.json.cs | 124 + ...ClusterPodIdentityException.PowerShell.cs} | 124 +- ...usterPodIdentityException.TypeConverter.cs | 149 + .../ManagedClusterPodIdentityException.cs | 90 + ...ManagedClusterPodIdentityException.json.cs | 116 + ...odIdentityExceptionPodLabels.PowerShell.cs | 145 + ...dentityExceptionPodLabels.TypeConverter.cs | 151 + ...gedClusterPodIdentityExceptionPodLabels.cs | 37 + ...odIdentityExceptionPodLabels.dictionary.cs | 75 + ...usterPodIdentityExceptionPodLabels.json.cs | 111 + ...gedClusterPodIdentityProfile.PowerShell.cs | 174 + ...ClusterPodIdentityProfile.TypeConverter.cs | 148 + .../ManagedClusterPodIdentityProfile.cs | 119 + .../ManagedClusterPodIdentityProfile.json.cs | 133 + ...PodIdentityProvisioningError.PowerShell.cs | 181 + ...IdentityProvisioningError.TypeConverter.cs | 151 + ...agedClusterPodIdentityProvisioningError.cs | 122 + ...lusterPodIdentityProvisioningError.json.cs | 110 + ...dentityProvisioningErrorBody.PowerShell.cs | 173 + ...tityProvisioningErrorBody.TypeConverter.cs | 151 + ...ClusterPodIdentityProvisioningErrorBody.cs | 122 + ...erPodIdentityProvisioningErrorBody.json.cs | 125 + ...rPodIdentityProvisioningInfo.PowerShell.cs | 187 + ...dIdentityProvisioningInfo.TypeConverter.cs | 151 + ...nagedClusterPodIdentityProvisioningInfo.cs | 124 + ...ClusterPodIdentityProvisioningInfo.json.cs | 109 + ...gedClusterPoolUpgradeProfile.PowerShell.cs | 36 +- ...ClusterPoolUpgradeProfile.TypeConverter.cs | 6 +- .../ManagedClusterPoolUpgradeProfile.cs | 46 +- .../ManagedClusterPoolUpgradeProfile.json.cs | 10 +- ...olUpgradeProfileUpgradesItem.PowerShell.cs | 28 +- ...pgradeProfileUpgradesItem.TypeConverter.cs | 6 +- ...edClusterPoolUpgradeProfileUpgradesItem.cs | 22 +- ...sterPoolUpgradeProfileUpgradesItem.json.cs | 8 +- .../ManagedClusterProperties.PowerShell.cs | 1080 +++ .../ManagedClusterProperties.TypeConverter.cs | 6 +- .../Api20230201/ManagedClusterProperties.cs | 1974 +++++ .../ManagedClusterProperties.json.cs | 74 +- ...usterPropertiesAddonProfiles.PowerShell.cs | 24 +- ...erPropertiesAddonProfiles.TypeConverter.cs | 6 +- .../ManagedClusterPropertiesAddonProfiles.cs | 14 +- ...usterPropertiesAddonProfiles.dictionary.cs | 26 +- ...agedClusterPropertiesAddonProfiles.json.cs | 14 +- ...rPropertiesAutoScalerProfile.PowerShell.cs | 92 +- ...opertiesAutoScalerProfile.TypeConverter.cs | 6 +- ...nagedClusterPropertiesAutoScalerProfile.cs | 193 +- ...ClusterPropertiesAutoScalerProfile.json.cs | 10 +- ...terPropertiesIdentityProfile.PowerShell.cs | 20 +- ...PropertiesIdentityProfile.TypeConverter.cs | 6 +- ...ManagedClusterPropertiesIdentityProfile.cs | 8 +- ...terPropertiesIdentityProfile.dictionary.cs | 26 +- ...edClusterPropertiesIdentityProfile.json.cs | 12 +- ...anagedClusterSecurityProfile.PowerShell.cs | 248 + ...edClusterSecurityProfile.TypeConverter.cs} | 30 +- .../ManagedClusterSecurityProfile.cs | 272 + .../ManagedClusterSecurityProfile.json.cs | 114 + ...usterSecurityProfileDefender.PowerShell.cs | 165 + ...erSecurityProfileDefender.TypeConverter.cs | 150 + .../ManagedClusterSecurityProfileDefender.cs | 93 + ...agedClusterSecurityProfileDefender.json.cs | 111 + ...leDefenderSecurityMonitoring.PowerShell.cs | 149 + ...efenderSecurityMonitoring.TypeConverter.cs | 153 + ...curityProfileDefenderSecurityMonitoring.cs | 53 + ...yProfileDefenderSecurityMonitoring.json.cs | 111 + ...rSecurityProfileImageCleaner.PowerShell.cs | 161 + ...curityProfileImageCleaner.TypeConverter.cs | 151 + ...nagedClusterSecurityProfileImageCleaner.cs | 75 + ...ClusterSecurityProfileImageCleaner.json.cs | 115 + ...urityProfileWorkloadIdentity.PowerShell.cs | 149 + ...tyProfileWorkloadIdentity.TypeConverter.cs | 151 + ...dClusterSecurityProfileWorkloadIdentity.cs | 53 + ...terSecurityProfileWorkloadIdentity.json.cs | 111 + ...usterServicePrincipalProfile.PowerShell.cs | 28 +- ...erServicePrincipalProfile.TypeConverter.cs | 6 +- .../ManagedClusterServicePrincipalProfile.cs | 6 +- ...agedClusterServicePrincipalProfile.json.cs | 8 +- .../ManagedClusterSku.PowerShell.cs | 30 +- .../ManagedClusterSku.TypeConverter.cs | 6 +- .../ManagedClusterSku.cs | 34 +- .../ManagedClusterSku.json.cs | 9 +- ...ManagedClusterStorageProfile.PowerShell.cs | 200 + ...agedClusterStorageProfile.TypeConverter.cs | 147 + .../ManagedClusterStorageProfile.cs | 138 + .../ManagedClusterStorageProfile.json.cs | 114 + ...rStorageProfileBlobCsiDriver.PowerShell.cs | 149 + ...orageProfileBlobCsiDriver.TypeConverter.cs | 151 + ...nagedClusterStorageProfileBlobCsiDriver.cs | 53 + ...ClusterStorageProfileBlobCsiDriver.json.cs | 110 + ...rStorageProfileDiskCsiDriver.PowerShell.cs | 149 + ...orageProfileDiskCsiDriver.TypeConverter.cs | 151 + ...nagedClusterStorageProfileDiskCsiDriver.cs | 53 + ...ClusterStorageProfileDiskCsiDriver.json.cs | 110 + ...rStorageProfileFileCsiDriver.PowerShell.cs | 149 + ...orageProfileFileCsiDriver.TypeConverter.cs | 151 + ...nagedClusterStorageProfileFileCsiDriver.cs | 53 + ...ClusterStorageProfileFileCsiDriver.json.cs | 110 + ...ageProfileSnapshotController.PowerShell.cs | 149 + ...ProfileSnapshotController.TypeConverter.cs | 151 + ...ClusterStorageProfileSnapshotController.cs | 53 + ...erStorageProfileSnapshotController.json.cs | 111 + ...ManagedClusterUpgradeProfile.PowerShell.cs | 60 +- ...agedClusterUpgradeProfile.TypeConverter.cs | 6 +- .../ManagedClusterUpgradeProfile.cs | 104 +- .../ManagedClusterUpgradeProfile.json.cs | 10 +- ...sterUpgradeProfileProperties.PowerShell.cs | 44 +- ...rUpgradeProfileProperties.TypeConverter.cs | 6 +- .../ManagedClusterUpgradeProfileProperties.cs | 68 +- ...gedClusterUpgradeProfileProperties.json.cs | 12 +- ...ManagedClusterWindowsProfile.PowerShell.cs | 200 + ...agedClusterWindowsProfile.TypeConverter.cs | 6 +- .../ManagedClusterWindowsProfile.cs | 219 + .../ManagedClusterWindowsProfile.json.cs | 14 +- ...terWorkloadAutoScalerProfile.PowerShell.cs | 157 + ...WorkloadAutoScalerProfile.TypeConverter.cs | 151 + ...ManagedClusterWorkloadAutoScalerProfile.cs | 64 + ...edClusterWorkloadAutoScalerProfile.json.cs | 110 + ...orkloadAutoScalerProfileKeda.PowerShell.cs | 151 + ...loadAutoScalerProfileKeda.TypeConverter.cs | 151 + ...gedClusterWorkloadAutoScalerProfileKeda.cs | 55 + ...sterWorkloadAutoScalerProfileKeda.json.cs} | 47 +- ...UserAssignedIdentitiesValue.PowerShell.cs} | 48 +- ...rAssignedIdentitiesValue.TypeConverter.cs} | 30 +- ...iceIdentityUserAssignedIdentitiesValue.cs} | 20 +- ...entityUserAssignedIdentitiesValue.json.cs} | 20 +- .../OSOptionProfile.PowerShell.cs} | 84 +- .../OSOptionProfile.TypeConverter.cs | 147 + .../api/Models/Api20230201/OSOptionProfile.cs | 120 + .../Api20230201/OSOptionProfile.json.cs | 123 + .../OSOptionProperty.PowerShell.cs | 152 + .../OSOptionProperty.TypeConverter.cs | 147 + .../Models/Api20230201/OSOptionProperty.cs | 68 + .../Api20230201/OSOptionProperty.json.cs | 110 + .../OSOptionPropertyList.PowerShell.cs | 144 + .../OSOptionPropertyList.TypeConverter.cs | 147 + .../Api20230201/OSOptionPropertyList.cs | 51 + .../Api20230201/OSOptionPropertyList.json.cs | 116 + .../OperationListResult.PowerShell.cs | 28 +- .../OperationListResult.TypeConverter.cs | 6 +- .../OperationListResult.cs | 32 +- .../OperationListResult.json.cs | 12 +- .../OperationValue.PowerShell.cs | 52 +- .../OperationValue.TypeConverter.cs | 6 +- .../OperationValue.cs | 68 +- .../OperationValue.json.cs | 12 +- .../OperationValueDisplay.PowerShell.cs | 40 +- .../OperationValueDisplay.TypeConverter.cs | 6 +- .../OperationValueDisplay.cs | 28 +- .../OperationValueDisplay.json.cs | 10 +- .../OutboundEnvironmentEndpoint.PowerShell.cs | 152 + ...tboundEnvironmentEndpoint.TypeConverter.cs | 147 + .../OutboundEnvironmentEndpoint.cs | 74 + .../OutboundEnvironmentEndpoint.json.cs | 118 + ...nvironmentEndpointCollection.PowerShell.cs | 157 + ...ronmentEndpointCollection.TypeConverter.cs | 150 + .../OutboundEnvironmentEndpointCollection.cs | 71 + ...boundEnvironmentEndpointCollection.json.cs | 122 + .../PowerState.PowerShell.cs | 24 +- .../PowerState.TypeConverter.cs | 6 +- .../PowerState.cs | 6 +- .../PowerState.json.cs | 8 +- .../PrivateEndpoint.PowerShell.cs | 24 +- .../PrivateEndpoint.TypeConverter.cs | 6 +- .../PrivateEndpoint.cs | 14 +- .../PrivateEndpoint.json.cs | 8 +- .../PrivateEndpointConnection.PowerShell.cs | 60 +- ...PrivateEndpointConnection.TypeConverter.cs | 6 +- .../PrivateEndpointConnection.cs | 46 +- .../PrivateEndpointConnection.json.cs | 10 +- ...EndpointConnectionListResult.PowerShell.cs | 24 +- ...pointConnectionListResult.TypeConverter.cs | 6 +- .../PrivateEndpointConnectionListResult.cs | 16 +- ...rivateEndpointConnectionListResult.json.cs | 10 +- ...EndpointConnectionProperties.PowerShell.cs | 44 +- ...pointConnectionProperties.TypeConverter.cs | 6 +- .../PrivateEndpointConnectionProperties.cs | 38 +- ...rivateEndpointConnectionProperties.json.cs | 12 +- .../PrivateLinkResource.PowerShell.cs | 44 +- .../PrivateLinkResource.TypeConverter.cs | 6 +- .../PrivateLinkResource.cs | 16 +- .../PrivateLinkResource.json.cs | 8 +- ...ivateLinkResourcesListResult.PowerShell.cs | 24 +- ...teLinkResourcesListResult.TypeConverter.cs | 6 +- .../PrivateLinkResourcesListResult.cs | 16 +- .../PrivateLinkResourcesListResult.json.cs | 10 +- ...teLinkServiceConnectionState.PowerShell.cs | 28 +- ...inkServiceConnectionState.TypeConverter.cs | 6 +- .../PrivateLinkServiceConnectionState.cs | 6 +- .../PrivateLinkServiceConnectionState.json.cs | 8 +- .../ResourceReference.PowerShell.cs | 24 +- .../ResourceReference.TypeConverter.cs | 6 +- .../ResourceReference.cs | 6 +- .../ResourceReference.json.cs | 8 +- .../RunCommandRequest.PowerShell.cs | 160 + .../RunCommandRequest.TypeConverter.cs | 147 + .../Models/Api20230201/RunCommandRequest.cs | 85 + .../Api20230201/RunCommandRequest.json.cs | 112 + .../RunCommandResult.PowerShell.cs | 200 + .../RunCommandResult.TypeConverter.cs | 147 + .../Models/Api20230201/RunCommandResult.cs | 168 + .../Api20230201/RunCommandResult.json.cs | 113 + .../Models/Api20230201/Snapshot.PowerShell.cs | 312 + .../Api20230201/Snapshot.TypeConverter.cs | 146 + .../api/Models/Api20230201/Snapshot.cs | 276 + .../Snapshot.json.cs} | 43 +- .../SnapshotListResult.PowerShell.cs | 152 + .../SnapshotListResult.TypeConverter.cs | 147 + .../Models/Api20230201/SnapshotListResult.cs | 71 + .../Api20230201/SnapshotListResult.json.cs | 121 + .../SnapshotProperties.PowerShell.cs | 208 + .../SnapshotProperties.TypeConverter.cs | 147 + .../Models/Api20230201/SnapshotProperties.cs | 210 + .../SnapshotProperties.json.cs} | 83 +- .../SubResource.PowerShell.cs | 32 +- .../SubResource.TypeConverter.cs | 6 +- .../SubResource.cs | 12 +- .../SubResource.json.cs | 8 +- .../Api20230201/SysctlConfig.PowerShell.cs | 360 + .../Api20230201/SysctlConfig.TypeConverter.cs | 147 + .../api/Models/Api20230201/SysctlConfig.cs | 510 ++ .../Models/Api20230201/SysctlConfig.json.cs | 162 + .../TagsObject.PowerShell.cs | 24 +- .../TagsObject.TypeConverter.cs | 6 +- .../TagsObject.cs | 16 +- .../TagsObject.json.cs | 10 +- .../TagsObjectTags.PowerShell.cs | 20 +- .../TagsObjectTags.TypeConverter.cs | 6 +- .../TagsObjectTags.cs | 6 +- .../TagsObjectTags.dictionary.cs | 4 +- .../TagsObjectTags.json.cs | 8 +- .../Api20230201/TimeInWeek.PowerShell.cs | 152 + .../Api20230201/TimeInWeek.TypeConverter.cs | 146 + .../api/Models/Api20230201/TimeInWeek.cs | 77 + .../api/Models/Api20230201/TimeInWeek.json.cs | 118 + .../Models/Api20230201/TimeSpan.PowerShell.cs | 152 + .../Api20230201/TimeSpan.TypeConverter.cs | 146 + .../api/Models/Api20230201/TimeSpan.cs | 68 + .../api/Models/Api20230201/TimeSpan.json.cs | 110 + .../UserAssignedIdentity.PowerShell.cs | 34 +- .../UserAssignedIdentity.TypeConverter.cs | 6 +- .../UserAssignedIdentity.cs | 33 +- .../UserAssignedIdentity.json.cs | 9 +- .../WindowsGmsaProfile.PowerShell.cs} | 81 +- .../WindowsGmsaProfile.TypeConverter.cs | 147 + .../Models/Api20230201/WindowsGmsaProfile.cs | 103 + .../Api20230201/WindowsGmsaProfile.json.cs | 112 + .../api/Models/Api30/Resource.PowerShell.cs | 218 + .../Resource.TypeConverter.cs | 6 +- .../generated/api/Models/Api30/Resource.cs | 208 + .../{Api20200901 => Api30}/Resource.json.cs | 23 +- .../api/Models/Api30/SystemData.PowerShell.cs | 184 + .../Models/Api30/SystemData.TypeConverter.cs | 146 + .../generated/api/Models/Api30/SystemData.cs | 136 + .../api/Models/Api30/SystemData.json.cs | 116 + .../Api30/TrackedResource.PowerShell.cs | 234 + .../Api30/TrackedResource.TypeConverter.cs | 147 + .../api/Models/Api30/TrackedResource.cs | 146 + .../api/Models/Api30/TrackedResource.json.cs | 114 + .../TrackedResourceTags.PowerShell.cs} | 54 +- .../TrackedResourceTags.TypeConverter.cs | 147 + .../api/Models/Api30/TrackedResourceTags.cs | 35 + .../TrackedResourceTags.dictionary.cs} | 6 +- .../TrackedResourceTags.json.cs} | 52 +- ...ationAcceptedResponseHeaders.PowerShell.cs | 155 + ...onAcceptedResponseHeaders.TypeConverter.cs | 153 + ...tLatestOperationAcceptedResponseHeaders.cs | 77 + ...stOperationAcceptedResponseHeaders.json.cs | 108 + ...eleteAcceptedResponseHeaders.PowerShell.cs | 147 + ...eAcceptedResponseHeaders.TypeConverter.cs} | 30 +- ...edClustersDeleteAcceptedResponseHeaders.cs | 57 + ...tersDeleteAcceptedResponseHeaders.json.cs} | 22 +- ...esultAcceptedResponseHeaders.PowerShell.cs | 147 + ...ltAcceptedResponseHeaders.TypeConverter.cs | 153 + ...GetCommandResultAcceptedResponseHeaders.cs | 57 + ...mmandResultAcceptedResponseHeaders.json.cs | 108 + ...ofileAcceptedResponseHeaders.PowerShell.cs | 147 + ...leAcceptedResponseHeaders.TypeConverter.cs | 153 + ...sResetAadProfileAcceptedResponseHeaders.cs | 57 + ...tAadProfileAcceptedResponseHeaders.json.cs | 108 + ...ofileAcceptedResponseHeaders.PowerShell.cs | 147 + ...leAcceptedResponseHeaders.TypeConverter.cs | 153 + ...PrincipalProfileAcceptedResponseHeaders.cs | 57 + ...ipalProfileAcceptedResponseHeaders.json.cs | 108 + ...catesAcceptedResponseHeaders.PowerShell.cs | 147 + ...esAcceptedResponseHeaders.TypeConverter.cs | 153 + ...sterCertificatesAcceptedResponseHeaders.cs | 57 + ...ertificatesAcceptedResponseHeaders.json.cs | 108 + ...gKeysAcceptedResponseHeaders.PowerShell.cs | 147 + ...ysAcceptedResponseHeaders.TypeConverter.cs | 153 + ...countSigningKeysAcceptedResponseHeaders.cs | 57 + ...SigningKeysAcceptedResponseHeaders.json.cs | 108 + ...mmandAcceptedResponseHeaders.PowerShell.cs | 147 + ...ndAcceptedResponseHeaders.TypeConverter.cs | 153 + ...ustersRunCommandAcceptedResponseHeaders.cs | 57 + ...sRunCommandAcceptedResponseHeaders.json.cs | 108 + ...StartAcceptedResponseHeaders.PowerShell.cs | 147 + ...rtAcceptedResponseHeaders.TypeConverter.cs | 151 + ...gedClustersStartAcceptedResponseHeaders.cs | 57 + ...ustersStartAcceptedResponseHeaders.json.cs | 107 + ...sStopAcceptedResponseHeaders.PowerShell.cs | 145 + ...opAcceptedResponseHeaders.TypeConverter.cs | 151 + ...agedClustersStopAcceptedResponseHeaders.cs | 57 + ...lustersStopAcceptedResponseHeaders.json.cs | 107 + .../api/Support/AgentPoolMode.Completer.cs | 5 +- .../Support/AgentPoolMode.TypeConverter.cs | 5 +- .../generated/api/Support/AgentPoolMode.cs | 10 +- .../api/Support/AgentPoolType.Completer.cs | 2 +- .../Support/AgentPoolType.TypeConverter.cs | 2 +- .../generated/api/Support/AgentPoolType.cs | 4 +- .../generated/api/Support/Code.cs | 2 + .../ContainerServiceVMSizeTypes.Completer.cs | 727 -- .../Support/ContainerServiceVMSizeTypes.cs | 446 - .../api/Support/CreatedByType.Completer.cs | 47 + ...rter.cs => CreatedByType.TypeConverter.cs} | 8 +- .../generated/api/Support/CreatedByType.cs | 102 + .../api/Support/Expander.Completer.cs | 9 +- .../api/Support/Expander.TypeConverter.cs | 5 +- .../generated/api/Support/Expander.cs | 23 + .../ExtendedLocationTypes.Completer.cs | 35 + .../ExtendedLocationTypes.TypeConverter.cs | 59 + .../api/Support/ExtendedLocationTypes.cs | 96 + .../generated/api/Support/Format.Completer.cs | 39 + .../api/Support/Format.TypeConverter.cs | 59 + ...erviceStorageProfileTypes.cs => Format.cs} | 76 +- .../Support/GpuInstanceProfile.Completer.cs | 53 + ...cs => GpuInstanceProfile.TypeConverter.cs} | 9 +- .../api/Support/GpuInstanceProfile.cs | 106 + .../api/Support/IPFamily.Completer.cs | 39 + .../api/Support/IPFamily.TypeConverter.cs | 59 + .../generated/api/Support/IPFamily.cs | 98 + .../KeyVaultNetworkAccessTypes.Completer.cs | 43 + ...eyVaultNetworkAccessTypes.TypeConverter.cs | 63 + .../api/Support/KeyVaultNetworkAccessTypes.cs | 104 + .../api/Support/KubeletDiskType.Completer.cs | 41 + .../Support/KubeletDiskType.TypeConverter.cs | 61 + .../generated/api/Support/KubeletDiskType.cs | 102 + .../api/Support/LicenseType.Completer.cs | 3 +- .../api/Support/LicenseType.TypeConverter.cs | 3 +- .../generated/api/Support/LicenseType.cs | 5 +- .../api/Support/LoadBalancerSku.Completer.cs | 5 +- .../Support/LoadBalancerSku.TypeConverter.cs | 5 +- .../generated/api/Support/LoadBalancerSku.cs | 11 +- ...rPodIdentityProvisioningState.Completer.cs | 55 + ...IdentityProvisioningState.TypeConverter.cs | 59 + ...agedClusterPodIdentityProvisioningState.cs | 116 + .../ManagedClusterSkuName.Completer.cs | 6 +- .../ManagedClusterSkuName.TypeConverter.cs | 2 +- .../api/Support/ManagedClusterSkuName.cs | 5 +- .../ManagedClusterSkuTier.Completer.cs | 9 +- .../ManagedClusterSkuTier.TypeConverter.cs | 5 +- .../api/Support/ManagedClusterSkuTier.cs | 16 +- .../api/Support/NetworkDataplane.Completer.cs | 39 + .../Support/NetworkDataplane.TypeConverter.cs | 59 + .../generated/api/Support/NetworkDataplane.cs | 103 + .../api/Support/NetworkMode.Completer.cs | 2 +- .../api/Support/NetworkMode.TypeConverter.cs | 2 +- .../generated/api/Support/NetworkMode.cs | 7 +- .../api/Support/NetworkPlugin.Completer.cs | 6 +- .../Support/NetworkPlugin.TypeConverter.cs | 2 +- .../generated/api/Support/NetworkPlugin.cs | 15 +- .../Support/NetworkPluginMode.Completer.cs | 35 + .../NetworkPluginMode.TypeConverter.cs | 59 + .../api/Support/NetworkPluginMode.cs | 100 + .../api/Support/NetworkPolicy.Completer.cs | 6 +- .../Support/NetworkPolicy.TypeConverter.cs | 2 +- .../generated/api/Support/NetworkPolicy.cs | 15 +- .../api/Support/OSDiskType.Completer.cs | 5 +- .../api/Support/OSDiskType.TypeConverter.cs | 5 +- .../generated/api/Support/OSDiskType.cs | 14 +- .../generated/api/Support/OSType.Completer.cs | 4 +- .../api/Support/OSType.TypeConverter.cs | 4 +- .../generated/api/Support/OSType.cs | 6 +- .../generated/api/Support/Ossku.Completer.cs | 50 + .../api/Support/Ossku.TypeConverter.cs | 62 + .../generated/api/Support/Ossku.cs | 105 + .../api/Support/OutboundType.Completer.cs | 12 +- .../api/Support/OutboundType.TypeConverter.cs | 4 +- .../generated/api/Support/OutboundType.cs | 21 +- ...ntConnectionProvisioningState.Completer.cs | 8 +- ...vateEndpointConnectionProvisioningState.cs | 2 + .../Support/PublicNetworkAccess.Completer.cs | 39 + .../PublicNetworkAccess.TypeConverter.cs | 59 + .../api/Support/PublicNetworkAccess.cs | 98 + .../Support/ResourceIdentityType.Completer.cs | 4 +- .../ResourceIdentityType.TypeConverter.cs | 4 +- .../api/Support/ResourceIdentityType.cs | 15 +- .../api/Support/ScaleDownMode.Completer.cs | 41 + .../Support/ScaleDownMode.TypeConverter.cs | 61 + .../generated/api/Support/ScaleDownMode.cs | 104 + .../ScaleSetEvictionPolicy.Completer.cs | 3 +- .../ScaleSetEvictionPolicy.TypeConverter.cs | 3 +- .../api/Support/ScaleSetEvictionPolicy.cs | 10 +- .../api/Support/ScaleSetPriority.Completer.cs | 4 +- .../Support/ScaleSetPriority.TypeConverter.cs | 4 +- .../generated/api/Support/ScaleSetPriority.cs | 9 +- .../api/Support/SnapshotType.Completer.cs | 35 + .../api/Support/SnapshotType.TypeConverter.cs | 59 + .../generated/api/Support/SnapshotType.cs | 97 + .../api/Support/UpgradeChannel.Completer.cs | 53 + .../Support/UpgradeChannel.TypeConverter.cs | 61 + .../generated/api/Support/UpgradeChannel.cs | 131 + .../api/Support/WeekDay.Completer.cs | 59 + .../api/Support/WeekDay.TypeConverter.cs | 59 + .../generated/api/Support/WeekDay.cs | 108 + ...pleter.cs => WorkloadRuntime.Completer.cs} | 17 +- .../Support/WorkloadRuntime.TypeConverter.cs | 59 + .../generated/api/Support/WorkloadRuntime.cs | 102 + ...tAzAksContainerServiceOrchestrator_List.cs | 14 +- .../GetAzAksMaintenanceConfiguration_Get.cs | 418 + ...MaintenanceConfiguration_GetViaIdentity.cs | 387 + .../GetAzAksMaintenanceConfiguration_List.cs | 426 + ...GetAzAksManagedClusterCommandResult_Get.cs | 463 ++ ...agedClusterCommandResult_GetViaIdentity.cs | 432 + .../GetAzAksManagedClusterOSOption_Get.cs | 404 + ...ksManagedClusterOSOption_GetViaIdentity.cs | 393 + ...rOutboundNetworkDependencyEndpoint_List.cs | 429 + .../GetAzAksNodePoolUpgradeProfile_Get.cs | 48 +- ...ksNodePoolUpgradeProfile_GetViaIdentity.cs | 33 +- .../cmdlets/GetAzAksOperation_List.cs | 29 +- .../generated/cmdlets/GetAzAksSnapshot_Get.cs | 404 + .../GetAzAksSnapshot_GetViaIdentity.cs | 383 + .../cmdlets/GetAzAksSnapshot_List.cs | 398 + .../cmdlets/GetAzAksSnapshot_List1.cs | 412 + .../cmdlets/GetAzAksUpgradeProfile_Get.cs | 48 +- .../GetAzAksUpgradeProfile_GetViaIdentity.cs | 33 +- ...zAksAbortAgentPoolLatestOperation_Abort.cs | 494 ++ ...entPoolLatestOperation_AbortViaIdentity.cs | 464 ++ ...bortManagedClusterLatestOperation_Abort.cs | 479 ++ ...ClusterLatestOperation_AbortViaIdentity.cs | 461 ++ ...dClusterServiceAccountSigningKey_Rotate.cs | 478 ++ ...viceAccountSigningKey_RotateViaIdentity.cs | 457 ++ ...MaintenanceConfiguration_CreateExpanded.cs | 452 ++ .../NewAzAksSnapshot_CreateExpanded.cs | 489 ++ ...oveAzAksMaintenanceConfiguration_Delete.cs | 457 ++ ...ntenanceConfiguration_DeleteViaIdentity.cs | 429 + .../cmdlets/RemoveAzAksSnapshot_Delete.cs | 443 + .../RemoveAzAksSnapshot_DeleteViaIdentity.cs | 425 + .../cmdlets/StartAzAksCluster_Start.cs | 36 +- .../StartAzAksCluster_StartViaIdentity.cs | 21 +- ...tAzAksManagedClusterCommand_RunExpanded.cs | 510 ++ ...edClusterCommand_RunViaIdentityExpanded.cs | 489 ++ .../cmdlets/StopAzAksCluster_Stop.cs | 39 +- .../StopAzAksCluster_StopViaIdentity.cs | 24 +- .../BuildTime/Models/PsProxyOutputs.cs | 2 +- .../runtime/MessageAttributeHelper.cs | 6 +- .../Get-AzAksContainerServiceOrchestrator.ps1 | 6 +- .../internal/Get-AzAksOperation.ps1 | 11 +- .../internal/ProxyCmdletDefinitions.ps1 | 17 +- ...AksMaintenanceConfiguration.Recording.json | 125 + ...et-AzAksMaintenanceConfiguration.Tests.ps1 | 37 + ...ManagedClusterCommandResult.Recording.json | 84 + ...AzAksManagedClusterCommandResult.Tests.ps1 | 38 + ...AzAksManagedClusterOSOption.Recording.json | 43 + .../Get-AzAksManagedClusterOSOption.Tests.ps1 | 27 + ...ndNetworkDependencyEndpoint.Recording.json | 43 + ...utboundNetworkDependencyEndpoint.Tests.ps1 | 35 + ...AzAksNodePoolUpgradeProfile.Recording.json | 20 +- .../test/Get-AzAksSnapshot.Recording.json | 166 + .../test/Get-AzAksSnapshot.Tests.ps1 | 45 + .../Get-AzAksUpgradeProfile.Recording.json | 22 +- .../test/Get-AzAksVersion.Recording.json | 20 +- .../test/Get-AzAksVersion.Tests.ps1 | 8 +- ...ortAgentPoolLatestOperation.Recording.json | 252 + ...AksAbortAgentPoolLatestOperation.Tests.ps1 | 26 + ...nagedClusterLatestOperation.Recording.json | 252 + ...ortManagedClusterLatestOperation.Tests.ps1 | 26 + ...terServiceAccountSigningKey.Recording.json | 498 ++ ...dClusterServiceAccountSigningKey.Tests.ps1 | 26 + ...AksMaintenanceConfiguration.Recording.json | 78 + ...ew-AzAksMaintenanceConfiguration.Tests.ps1 | 34 + .../test/New-AzAksSnapshot.Recording.json | 78 + .../test/New-AzAksSnapshot.Tests.ps1 | 36 + .../test/New-AzAksTimeInWeekObject.Tests.ps1 | 21 + .../test/New-AzAksTimeSpanObject.Tests.ps1 | 21 + ...AksMaintenanceConfiguration.Recording.json | 154 + ...ve-AzAksMaintenanceConfiguration.Tests.ps1 | 31 + .../test/Remove-AzAksSnapshot.Recording.json | 154 + .../test/Remove-AzAksSnapshot.Tests.ps1 | 29 + .../test/Start-AzAksCluster.Recording.json | 711 +- ...-AzAksManagedClusterCommand.Recording.json | 238 + ...Start-AzAksManagedClusterCommand.Tests.ps1 | 34 + .../test/Stop-AzAksCluster.Recording.json | 151 +- src/Aks/Aks.Autorest/test/env.json | 9 +- src/Aks/Aks.Autorest/test/utils.ps1 | 1 + src/Aks/Aks/Az.Aks.psd1 | 19 +- src/Aks/Aks/help/Az.Aks.md | 63 +- .../help/Get-AzAksMaintenanceConfiguration.md | 207 + .../Get-AzAksManagedClusterCommandResult.md | 192 + .../help/Get-AzAksManagedClusterOSOption.md | 154 + ...lusterOutboundNetworkDependencyEndpoint.md | 121 + .../help/Get-AzAksNodePoolUpgradeProfile.md | 119 +- src/Aks/Aks/help/Get-AzAksSnapshot.md | 203 + src/Aks/Aks/help/Get-AzAksUpgradeProfile.md | 119 +- src/Aks/Aks/help/Get-AzAksVersion.md | 97 +- ...voke-AzAksAbortAgentPoolLatestOperation.md | 249 + ...AzAksAbortManagedClusterLatestOperation.md | 234 + ...eManagedClusterServiceAccountSigningKey.md | 226 + .../help/New-AzAksMaintenanceConfiguration.md | 209 + src/Aks/Aks/help/New-AzAksSnapshot.md | 209 + src/Aks/Aks/help/New-AzAksTimeInWeekObject.md | 86 + src/Aks/Aks/help/New-AzAksTimeSpanObject.md | 85 + .../Remove-AzAksMaintenanceConfiguration.md | 216 + src/Aks/Aks/help/Remove-AzAksSnapshot.md | 201 + src/Aks/Aks/help/Start-AzAksCluster.md | 119 +- .../help/Start-AzAksManagedClusterCommand.md | 295 + src/Aks/Aks/help/Stop-AzAksCluster.md | 125 +- 842 files changed, 89382 insertions(+), 17412 deletions(-) create mode 100644 src/Aks/Aks.Autorest/custom/autogen-model-cmdlets/New-AzAksTimeInWeekObject.ps1 create mode 100644 src/Aks/Aks.Autorest/custom/autogen-model-cmdlets/New-AzAksTimeSpanObject.ps1 create mode 100644 src/Aks/Aks.Autorest/docs/Get-AzAksMaintenanceConfiguration.md create mode 100644 src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterCommandResult.md create mode 100644 src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOSOption.md create mode 100644 src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md create mode 100644 src/Aks/Aks.Autorest/docs/Get-AzAksSnapshot.md create mode 100644 src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortAgentPoolLatestOperation.md create mode 100644 src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortManagedClusterLatestOperation.md create mode 100644 src/Aks/Aks.Autorest/docs/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md create mode 100644 src/Aks/Aks.Autorest/docs/New-AzAksMaintenanceConfiguration.md create mode 100644 src/Aks/Aks.Autorest/docs/New-AzAksSnapshot.md create mode 100644 src/Aks/Aks.Autorest/docs/New-AzAksTimeInWeekObject.md create mode 100644 src/Aks/Aks.Autorest/docs/New-AzAksTimeSpanObject.md create mode 100644 src/Aks/Aks.Autorest/docs/Remove-AzAksMaintenanceConfiguration.md create mode 100644 src/Aks/Aks.Autorest/docs/Remove-AzAksSnapshot.md create mode 100644 src/Aks/Aks.Autorest/docs/Start-AzAksManagedClusterCommand.md create mode 100644 src/Aks/Aks.Autorest/examples/Get-AzAksMaintenanceConfiguration.md create mode 100644 src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterCommandResult.md create mode 100644 src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterOSOption.md create mode 100644 src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md create mode 100644 src/Aks/Aks.Autorest/examples/Get-AzAksSnapshot.md create mode 100644 src/Aks/Aks.Autorest/examples/Invoke-AzAksAbortAgentPoolLatestOperation.md create mode 100644 src/Aks/Aks.Autorest/examples/Invoke-AzAksAbortManagedClusterLatestOperation.md create mode 100644 src/Aks/Aks.Autorest/examples/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md create mode 100644 src/Aks/Aks.Autorest/examples/New-AzAksMaintenanceConfiguration.md create mode 100644 src/Aks/Aks.Autorest/examples/New-AzAksSnapshot.md create mode 100644 src/Aks/Aks.Autorest/examples/New-AzAksTimeInWeekObject.md create mode 100644 src/Aks/Aks.Autorest/examples/New-AzAksTimeSpanObject.md create mode 100644 src/Aks/Aks.Autorest/examples/Remove-AzAksMaintenanceConfiguration.md create mode 100644 src/Aks/Aks.Autorest/examples/Remove-AzAksSnapshot.md create mode 100644 src/Aks/Aks.Autorest/examples/Start-AzAksManagedClusterCommand.md create mode 100644 src/Aks/Aks.Autorest/exports/Get-AzAksMaintenanceConfiguration.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterCommandResult.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOSOption.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/Get-AzAksSnapshot.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/Invoke-AzAksAbortAgentPoolLatestOperation.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/Invoke-AzAksAbortManagedClusterLatestOperation.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/New-AzAksMaintenanceConfiguration.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/New-AzAksSnapshot.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/New-AzAksTimeInWeekObject.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/New-AzAksTimeSpanObject.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/Remove-AzAksMaintenanceConfiguration.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/Remove-AzAksSnapshot.ps1 create mode 100644 src/Aks/Aks.Autorest/exports/Start-AzAksManagedClusterCommand.ps1 create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ContainerServiceDiagnosticsProfile.json.cs => AgentPoolsDeleteAcceptedResponseHeaders.json.cs} (77%) delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.PowerShell.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.PowerShell.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.PowerShell.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.PowerShell.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.PowerShell.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.PowerShell.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.PowerShell.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AccessProfile.PowerShell.cs (89%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AccessProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AccessProfile.cs (90%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AccessProfile.json.cs (96%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPool.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPool.json.cs (95%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersions.PowerShell.cs (78%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersions.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersions.cs (71%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersions.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersionsProperties.PowerShell.cs (86%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersionsProperties.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersionsProperties.cs (81%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersionsProperties.json.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.PowerShell.cs (87%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs (88%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolListResult.PowerShell.cs (84%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolListResult.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolListResult.cs (84%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolListResult.json.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfile.PowerShell.cs (78%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfile.cs (65%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfile.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfileProperties.PowerShell.cs (83%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfileProperties.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfileProperties.cs (71%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfileProperties.json.cs (95%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfilePropertiesUpgradesItem.PowerShell.cs (88%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfilePropertiesUpgradesItem.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs (73%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeProfilePropertiesUpgradesItem.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeSettings.PowerShell.cs (89%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeSettings.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/AgentPoolUpgradeSettings.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/Resource.PowerShell.cs => Api20230201/AzureKeyVaultKms.PowerShell.cs} (59%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CloudError.PowerShell.cs (78%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CloudError.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CloudError.cs (81%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CloudError.json.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CloudErrorBody.PowerShell.cs (81%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CloudErrorBody.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CloudErrorBody.cs (91%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CloudErrorBody.json.cs (94%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceLinuxProfile.PowerShell.cs (81%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceLinuxProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceLinuxProfile.cs (72%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceLinuxProfile.json.cs (95%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceNetworkProfile.PowerShell.cs (50%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceNetworkProfile.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceNetworkProfile.json.cs (67%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceSshConfiguration.PowerShell.cs (86%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceSshConfiguration.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceSshConfiguration.cs (75%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceSshConfiguration.json.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceSshPublicKey.PowerShell.cs (89%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceSshPublicKey.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceSshPublicKey.cs (92%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ContainerServiceSshPublicKey.json.cs (96%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ResourceTags.TypeConverter.cs => Api20230201/CreationData.TypeConverter.cs} (88%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CredentialResult.PowerShell.cs (87%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CredentialResult.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CredentialResult.cs (89%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CredentialResult.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CredentialResults.PowerShell.cs (84%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CredentialResults.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CredentialResults.cs (71%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/CredentialResults.json.cs (93%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/BaseManagedCluster.TypeConverter.cs => Api20230201/EndpointDependency.TypeConverter.cs} (87%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ManagedClusterWindowsProfile.PowerShell.cs => Api20230201/EndpointDetail.PowerShell.cs} (60%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ContainerServiceDiagnosticsProfile.TypeConverter.cs => Api20230201/MaintenanceConfigurationListResult.TypeConverter.cs} (85%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedCluster.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedCluster.json.cs (76%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAadProfile.PowerShell.cs (80%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAadProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAadProfile.cs (71%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAadProfile.json.cs (96%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAccessProfile.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAccessProfile.json.cs (93%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfile.PowerShell.cs (79%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfile.cs (72%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfile.json.cs (95%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfileConfig.PowerShell.cs (92%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfileConfig.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfileConfig.cs (86%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfileConfig.dictionary.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfileConfig.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfileIdentity.PowerShell.cs (86%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfileIdentity.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfileIdentity.cs (75%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAddonProfileIdentity.json.cs (95%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfile.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfile.json.cs (95%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfileProperties.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfileProperties.json.cs (70%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfilePropertiesNodeLabels.PowerShell.cs (90%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfilePropertiesNodeLabels.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfilePropertiesNodeLabels.cs (72%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfilePropertiesNodeLabels.dictionary.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfilePropertiesNodeLabels.json.cs (95%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfilePropertiesTags.PowerShell.cs (90%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfilePropertiesTags.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfilePropertiesTags.cs (70%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfilePropertiesTags.dictionary.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterAgentPoolProfilePropertiesTags.json.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterApiServerAccessProfile.PowerShell.cs (68%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterApiServerAccessProfile.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterApiServerAccessProfile.json.cs (81%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ContainerServiceVMDiagnostics.TypeConverter.cs => Api20230201/ManagedClusterHttpProxyConfig.TypeConverter.cs} (85%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterIdentity.PowerShell.cs (82%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterIdentity.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterIdentity.cs (60%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterIdentity.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs (84%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterIdentityUserAssignedIdentities.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterIdentityUserAssignedIdentities.dictionary.cs (78%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterIdentityUserAssignedIdentities.json.cs (89%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterListResult.PowerShell.cs (84%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterListResult.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterListResult.cs (84%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterListResult.json.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfile.PowerShell.cs (66%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfile.cs (57%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfile.json.cs (88%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileManagedOutboundIPs.PowerShell.cs (81%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileManagedOutboundIPs.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileManagedOutboundIPs.json.cs (90%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.PowerShell.cs (86%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs (82%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.json.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileOutboundIPs.PowerShell.cs (86%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileOutboundIPs.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileOutboundIPs.cs (81%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterLoadBalancerProfileOutboundIPs.json.cs (94%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ContainerServiceVMDiagnostics.PowerShell.cs => Api20230201/ManagedClusterOidcIssuerProfile.PowerShell.cs} (66%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ContainerServiceDiagnosticsProfile.PowerShell.cs => Api20230201/ManagedClusterPodIdentityException.PowerShell.cs} (61%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.dictionary.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPoolUpgradeProfile.PowerShell.cs (81%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPoolUpgradeProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPoolUpgradeProfile.cs (74%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPoolUpgradeProfile.json.cs (95%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPoolUpgradeProfileUpgradesItem.PowerShell.cs (88%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPoolUpgradeProfileUpgradesItem.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPoolUpgradeProfileUpgradesItem.cs (73%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPoolUpgradeProfileUpgradesItem.json.cs (96%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterProperties.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterProperties.json.cs (64%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesAddonProfiles.PowerShell.cs (90%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesAddonProfiles.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesAddonProfiles.cs (72%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesAddonProfiles.dictionary.cs (80%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesAddonProfiles.json.cs (92%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs (76%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesAutoScalerProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesAutoScalerProfile.cs (56%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesAutoScalerProfile.json.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesIdentityProfile.PowerShell.cs (92%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesIdentityProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesIdentityProfile.cs (82%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesIdentityProfile.dictionary.cs (79%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterPropertiesIdentityProfile.json.cs (93%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ContainerServiceMasterProfile.TypeConverter.cs => Api20230201/ManagedClusterSecurityProfile.TypeConverter.cs} (87%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterServicePrincipalProfile.PowerShell.cs (88%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterServicePrincipalProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterServicePrincipalProfile.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterServicePrincipalProfile.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterSku.PowerShell.cs (86%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterSku.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterSku.cs (64%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterSku.json.cs (95%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterUpgradeProfile.PowerShell.cs (75%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterUpgradeProfile.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterUpgradeProfile.cs (68%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterUpgradeProfile.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterUpgradeProfileProperties.PowerShell.cs (79%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterUpgradeProfileProperties.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterUpgradeProfileProperties.cs (71%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterUpgradeProfileProperties.json.cs (93%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterWindowsProfile.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ManagedClusterWindowsProfile.json.cs (85%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ContainerServiceVMDiagnostics.json.cs => Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.json.cs} (77%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.PowerShell.cs => Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.PowerShell.cs} (80%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.TypeConverter.cs => Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.TypeConverter.cs} (87%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.cs => Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.cs} (78%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.json.cs => Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.json.cs} (90%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ManagedClusterAccessProfile.PowerShell.cs => Api20230201/OSOptionProfile.PowerShell.cs} (53%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationListResult.PowerShell.cs (84%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationListResult.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationListResult.cs (61%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationListResult.json.cs (93%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationValue.PowerShell.cs (78%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationValue.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationValue.cs (69%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationValue.json.cs (95%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationValueDisplay.PowerShell.cs (83%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationValueDisplay.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationValueDisplay.cs (82%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/OperationValueDisplay.json.cs (96%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PowerState.PowerShell.cs (89%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PowerState.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PowerState.cs (91%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PowerState.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpoint.PowerShell.cs (89%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpoint.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpoint.cs (76%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpoint.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnection.PowerShell.cs (77%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnection.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnection.cs (80%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnection.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnectionListResult.PowerShell.cs (86%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnectionListResult.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnectionListResult.cs (80%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnectionListResult.json.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnectionProperties.PowerShell.cs (82%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnectionProperties.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnectionProperties.cs (81%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateEndpointConnectionProperties.json.cs (95%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkResource.PowerShell.cs (82%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkResource.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkResource.cs (92%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkResource.json.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkResourcesListResult.PowerShell.cs (85%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkResourcesListResult.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkResourcesListResult.cs (79%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkResourcesListResult.json.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkServiceConnectionState.PowerShell.cs (88%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkServiceConnectionState.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkServiceConnectionState.cs (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/PrivateLinkServiceConnectionState.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ResourceReference.PowerShell.cs (89%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ResourceReference.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ResourceReference.cs (90%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/ResourceReference.json.cs (96%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/BaseManagedCluster.json.cs => Api20230201/Snapshot.json.cs} (79%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ContainerServiceMasterProfile.json.cs => Api20230201/SnapshotProperties.json.cs} (54%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/SubResource.PowerShell.cs (85%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/SubResource.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/SubResource.cs (91%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/SubResource.json.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/TagsObject.PowerShell.cs (86%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/TagsObject.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/TagsObject.cs (76%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/TagsObject.json.cs (95%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/TagsObjectTags.PowerShell.cs (92%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/TagsObjectTags.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/TagsObjectTags.cs (83%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/TagsObjectTags.dictionary.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/TagsObjectTags.json.cs (96%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/UserAssignedIdentity.PowerShell.cs (84%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/UserAssignedIdentity.TypeConverter.cs (97%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/UserAssignedIdentity.cs (71%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api20230201}/UserAssignedIdentity.json.cs (96%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ManagedClusterPropertiesIdentityProfileValue.PowerShell.cs => Api20230201/WindowsGmsaProfile.PowerShell.cs} (62%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api30}/Resource.TypeConverter.cs (97%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901 => Api30}/Resource.json.cs (85%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.json.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ResourceTags.PowerShell.cs => Api30/TrackedResourceTags.PowerShell.cs} (79%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ResourceTags.dictionary.cs => Api30/TrackedResourceTags.dictionary.cs} (94%) rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ResourceTags.json.cs => Api30/TrackedResourceTags.json.cs} (85%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.PowerShell.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ManagedClusterPropertiesIdentityProfileValue.TypeConverter.cs => ManagedClustersDeleteAcceptedResponseHeaders.TypeConverter.cs} (82%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.cs rename src/Aks/Aks.Autorest/generated/api/Models/{Api20200901/ManagedClusterPropertiesIdentityProfileValue.json.cs => ManagedClustersDeleteAcceptedResponseHeaders.json.cs} (84%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.json.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.PowerShell.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.json.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.Completer.cs delete mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.Completer.cs rename src/Aks/Aks.Autorest/generated/api/Support/{ContainerServiceVMSizeTypes.TypeConverter.cs => CreatedByType.TypeConverter.cs} (91%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/Format.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/Format.TypeConverter.cs rename src/Aks/Aks.Autorest/generated/api/Support/{ContainerServiceStorageProfileTypes.cs => Format.cs} (51%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.Completer.cs rename src/Aks/Aks.Autorest/generated/api/Support/{ContainerServiceStorageProfileTypes.TypeConverter.cs => GpuInstanceProfile.TypeConverter.cs} (87%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/IPFamily.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/IPFamily.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/IPFamily.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/Ossku.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/Ossku.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/Ossku.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/WeekDay.Completer.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/WeekDay.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/WeekDay.cs rename src/Aks/Aks.Autorest/generated/api/Support/{ContainerServiceStorageProfileTypes.Completer.cs => WorkloadRuntime.Completer.cs} (74%) create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.TypeConverter.cs create mode 100644 src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_Get.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_List.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_Get.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_Get.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_GetViaIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_List.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_Get.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_GetViaIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List1.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_Abort.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_Abort.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateExpanded.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateExpanded.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_Delete.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_Delete.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_DeleteViaIdentity.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunExpanded.cs create mode 100644 src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaIdentityExpanded.cs create mode 100644 src/Aks/Aks.Autorest/test/Get-AzAksMaintenanceConfiguration.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Get-AzAksMaintenanceConfiguration.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterCommandResult.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterCommandResult.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOSOption.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOSOption.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/Get-AzAksSnapshot.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Get-AzAksSnapshot.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/Invoke-AzAksAbortAgentPoolLatestOperation.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Invoke-AzAksAbortAgentPoolLatestOperation.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/Invoke-AzAksAbortManagedClusterLatestOperation.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Invoke-AzAksAbortManagedClusterLatestOperation.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/New-AzAksMaintenanceConfiguration.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/New-AzAksMaintenanceConfiguration.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/New-AzAksSnapshot.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/New-AzAksSnapshot.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/New-AzAksTimeInWeekObject.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/New-AzAksTimeSpanObject.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/Remove-AzAksMaintenanceConfiguration.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Remove-AzAksMaintenanceConfiguration.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/Remove-AzAksSnapshot.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Remove-AzAksSnapshot.Tests.ps1 create mode 100644 src/Aks/Aks.Autorest/test/Start-AzAksManagedClusterCommand.Recording.json create mode 100644 src/Aks/Aks.Autorest/test/Start-AzAksManagedClusterCommand.Tests.ps1 create mode 100644 src/Aks/Aks/help/Get-AzAksMaintenanceConfiguration.md create mode 100644 src/Aks/Aks/help/Get-AzAksManagedClusterCommandResult.md create mode 100644 src/Aks/Aks/help/Get-AzAksManagedClusterOSOption.md create mode 100644 src/Aks/Aks/help/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md create mode 100644 src/Aks/Aks/help/Get-AzAksSnapshot.md create mode 100644 src/Aks/Aks/help/Invoke-AzAksAbortAgentPoolLatestOperation.md create mode 100644 src/Aks/Aks/help/Invoke-AzAksAbortManagedClusterLatestOperation.md create mode 100644 src/Aks/Aks/help/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md create mode 100644 src/Aks/Aks/help/New-AzAksMaintenanceConfiguration.md create mode 100644 src/Aks/Aks/help/New-AzAksSnapshot.md create mode 100644 src/Aks/Aks/help/New-AzAksTimeInWeekObject.md create mode 100644 src/Aks/Aks/help/New-AzAksTimeSpanObject.md create mode 100644 src/Aks/Aks/help/Remove-AzAksMaintenanceConfiguration.md create mode 100644 src/Aks/Aks/help/Remove-AzAksSnapshot.md create mode 100644 src/Aks/Aks/help/Start-AzAksManagedClusterCommand.md diff --git a/src/Aks/Aks.Autorest/Az.Aks.format.ps1xml b/src/Aks/Aks.Autorest/Az.Aks.format.ps1xml index f79cdfd32e87..56efa18bd348 100644 --- a/src/Aks/Aks.Autorest/Az.Aks.format.ps1xml +++ b/src/Aks/Aks.Autorest/Az.Aks.format.ps1xml @@ -1,6 +1,56 @@ + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolsAbortLatestOperationAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolsAbortLatestOperationAcceptedResponseHeaders + + + + + + + + + + + + + + + AzureAsyncOperation + + + Location + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolsDeleteAcceptedResponseHeaders + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AgentPoolsDeleteAcceptedResponseHeaders + + + + + + + + + + + + Location + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.AksIdentity @@ -11,6 +61,12 @@ + + + + + + @@ -36,6 +92,12 @@ AgentPoolName + + CommandId + + + ConfigName + Location @@ -60,21 +122,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AccessProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersAbortLatestOperationAcceptedResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AccessProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersAbortLatestOperationAcceptedResponseHeaders - + + + + - KubeConfig + AzureAsyncOperation + + + Location @@ -82,21 +150,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPool + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersDeleteAcceptedResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPool + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersDeleteAcceptedResponseHeaders - + - Name + Location @@ -104,21 +172,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersions + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersGetCommandResultAcceptedResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersions + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersGetCommandResultAcceptedResponseHeaders - + - Name + Location @@ -126,33 +194,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersResetAadProfileAcceptedResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersResetAadProfileAcceptedResponseHeaders - - - - - - - + - Default - - - IsPreview - - - KubernetesVersion + Location @@ -160,21 +216,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolListResult + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolListResult + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders - + - NextLink + Location @@ -182,21 +238,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders - + - Name + Location @@ -204,33 +260,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfileProperties + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfileProperties + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders - - - - - - - + - KubernetesVersion - - - LatestNodeImageVersion - - - OSType + Location @@ -238,27 +282,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfilePropertiesUpgradesItem + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersRunCommandAcceptedResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfilePropertiesUpgradesItem + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersRunCommandAcceptedResponseHeaders - - - - + - IsPreview - - - KubernetesVersion + Location @@ -266,21 +304,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettings + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersStartAcceptedResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettings + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersStartAcceptedResponseHeaders - + - MaxSurge + Location @@ -288,33 +326,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBody + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersStopAcceptedResponseHeaders - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBody + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.ManagedClustersStopAcceptedResponseHeaders - - - - - - - + - Code - - - Message - - - Target + Location @@ -322,21 +348,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.Resource - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.Resource - + - AdminUsername + Name @@ -344,63 +370,51 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceMasterProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemData - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceMasterProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemData - - - - - - - + - + - + - + - + - + - Count - - - DnsPrefix + CreatedAt - FirstConsecutiveStaticIP + CreatedBy - Fqdn - - - OSDiskSizeGb + CreatedByType - StorageProfile + LastModifiedAt - VMSize + LastModifiedBy - VnetSubnetId + LastModifiedByType @@ -408,69 +422,63 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResource - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResource - - - - + - + - + - + - + - + - + - + - DnsServiceIP - - - DockerBridgeCidr + Name - LoadBalancerSku + SystemDataCreatedAt - NetworkMode + SystemDataCreatedBy - NetworkPlugin + SystemDataCreatedByType - NetworkPolicy + SystemDataLastModifiedAt - OutboundType + SystemDataLastModifiedBy - PodCidr + SystemDataLastModifiedByType - ServiceCidr + Location @@ -478,21 +486,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKey + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTags - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKey + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTags - + - KeyData + Item @@ -500,27 +508,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceVMDiagnostics + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AccessProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceVMDiagnostics + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AccessProfile - - - - + - Enabled - - - StorageUri + KubeConfig @@ -528,9 +530,9 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CredentialResult + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPool - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CredentialResult + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPool @@ -538,7 +540,7 @@ - + @@ -548,7 +550,7 @@ Name - Value + AzureAsyncOperation @@ -556,369 +558,1905 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedCluster + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersions - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedCluster + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersions - - - - - - - - - - - - - + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem + + + - + - + - + + + + + + + Default + + + IsPreview + + + KubernetesVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolListResult + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolListResult + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfile + + + - + + + + + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfileProperties + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfileProperties + + + - + - + - + + + + + + + KubernetesVersion + + + LatestNodeImageVersion + + + OSType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfilePropertiesUpgradesItem + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfilePropertiesUpgradesItem + + + - + - + + + + + + + IsPreview + + + KubernetesVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeSettings + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeSettings + + + - + + + + + + + MaxSurge + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKms + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKms + + + - + - + - + - + + + + + + + Enabled + + + KeyId + + + KeyVaultNetworkAccess + + + KeyVaultResourceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CloudErrorBody + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CloudErrorBody + + + - + - + - + + + + + + + Code + + + Message + + + Target + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CommandResultProperties + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CommandResultProperties + + + - + - + - + - + - + - + + + + + + + ExitCode + + + FinishedAt + + + Log + + + ProvisioningState + + + Reason + + + StartedAt + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceLinuxProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceLinuxProfile + + + - + + + + + + + AdminUsername + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceNetworkProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceNetworkProfile + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - AadProfileAdminGroupObjectID + DnsServiceIP - AadProfileClientAppId + DockerBridgeCidr - AadProfileEnableAzureRbac + IPFamily - AadProfileManaged + LoadBalancerSku - AadProfileServerAppId + NetworkDataplane - AadProfileServerAppSecret + NetworkMode - AadProfileTenantId + NetworkPlugin - ApiServerAccessProfileAuthorizedIPRange + NetworkPluginMode - ApiServerAccessProfileEnablePrivateCluster + NetworkPolicy - AutoScalerProfileBalanceSimilarNodeGroup + OutboundType - AutoScalerProfileExpander + PodCidr - AutoScalerProfileMaxEmptyBulkDelete + PodCidrs - AutoScalerProfileMaxGracefulTerminationSec - - - AutoScalerProfileMaxTotalUnreadyPercentage - - - AutoScalerProfileNewPodScaleUpDelay + ServiceCidr - AutoScalerProfileOkTotalUnreadyCount + ServiceCidrs + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKey + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKey + + + + + + + + + + - AutoScalerProfileScaleDownDelayAfterAdd + KeyData + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationData + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationData + + + + + + + + + + - AutoScalerProfileScaleDownDelayAfterDelete + SourceResourceId + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CredentialResult + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CredentialResult + + + + + + + + + + + + + - AutoScalerProfileScaleDownDelayAfterFailure + Name - AutoScalerProfileScaleDownUnneededTime + Value + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.EndpointDependency + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.EndpointDependency + + + + + + + + + + - AutoScalerProfileScaleDownUnreadyTime + DomainName + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.EndpointDetail + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.EndpointDetail + + + + + + + + + + + + + + + + + + + - AutoScalerProfileScaleDownUtilizationThreshold + Description - AutoScalerProfileScanInterval + IPAddress - AutoScalerProfileSkipNodesWithLocalStorage + Port - AutoScalerProfileSkipNodesWithSystemPod + Protocol + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ExtendedLocation + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ExtendedLocation + + + + + + + + + + - DiskEncryptionSetId + Name + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfig + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfig + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - DnsPrefix + AllowedUnsafeSysctl - EnablePodSecurityPolicy + ContainerLogMaxFile - EnableRbac + ContainerLogMaxSizeMb - Fqdn + CpuCfsQuota - IdentityPrincipalId + CpuCfsQuotaPeriod - IdentityTenantId + CpuManagerPolicy - IdentityType + FailSwapOn - KubernetesVersion + ImageGcHighThreshold - LinuxProfileAdminUsername + ImageGcLowThreshold - LoadBalancerProfileAllocatedOutboundPort + PodMaxPid - LoadBalancerProfileIdleTimeoutInMinute + TopologyManagerPolicy + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfig + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfig + + + + + + + + + + + + + + + + - Location + SwapFileSizeMb - ManagedOutboundIPCount + TransparentHugePageDefrag - MaxAgentPool + TransparentHugePageEnabled + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfiguration + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfiguration + + + + + + + + + + Name + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfigurationListResult + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfigurationListResult + + + + + + + + + + - NetworkProfileDnsServiceIP - - - NetworkProfileDockerBridgeCidr + NextLink + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedCluster + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedCluster + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - NetworkProfileLoadBalancerSku + Location - NetworkProfileNetworkMode + Name - NetworkProfileNetworkPlugin + SystemDataCreatedAt - NetworkProfileNetworkPolicy + SystemDataCreatedBy - NetworkProfileOutboundType + SystemDataCreatedByType - NetworkProfilePodCidr + SystemDataLastModifiedAt - NetworkProfileServiceCidr + SystemDataLastModifiedBy - NodeResourceGroup + SystemDataLastModifiedByType - + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAadProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAadProfile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AdminGroupObjectID + + + ClientAppId + + + EnableAzureRbac + + + Managed + + + ServerAppId + + + ServerAppSecret + + + TenantId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAccessProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAccessProfile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Location + + + Name + + + SystemDataCreatedAt + + + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfile + + + + + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfileConfig + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfileConfig + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfileIdentity + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfileIdentity + + + + + + + + + + + + + + + + + + ClientId + + + ObjectId + + + ResourceId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AvailabilityZone + + + Count + + + CreationDataSourceResourceId + + + CurrentOrchestratorVersion + + + EnableAutoScaling + + + EnableEncryptionAtHost + + + EnableFips + + + EnableNodePublicIP + + + EnableUltraSsd + + + GpuInstanceProfile + + + HostGroupId + + + KubeletConfigAllowedUnsafeSysctl + + + KubeletConfigContainerLogMaxFile + + + KubeletConfigContainerLogMaxSizeMb + + + KubeletConfigCpuCfsQuota + + + KubeletConfigCpuCfsQuotaPeriod + + + KubeletConfigCpuManagerPolicy + + + KubeletConfigFailSwapOn + + + KubeletConfigImageGcHighThreshold + + + KubeletConfigImageGcLowThreshold + + + KubeletConfigPodMaxPid + + + KubeletConfigTopologyManagerPolicy + + + KubeletDiskType + + + LinuxOSConfigSwapFileSizeMb + + + LinuxOSConfigTransparentHugePageDefrag + + + LinuxOSConfigTransparentHugePageEnabled + + + MaxCount + + + MaxPod + + + MinCount + + + Mode + + + NodeImageVersion + + + NodePublicIPPrefixId + + + NodeTaint + + + OSDiskSizeGb + + + OSDiskType + + + OSSku + + + OSType + + + OrchestratorVersion + + + PodSubnetId + + PowerStateCode - PrivateFqdn + ProvisioningState + + + ProximityPlacementGroupId + + + ScaleDownMode + + + ScaleSetEvictionPolicy + + + ScaleSetPriority + + + SpotMaxPrice + + + UpgradeSettingMaxSurge + + + VMSize + + + VnetSubnetId + + + WorkloadRuntime + + + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileProperties + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileProperties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + AvailabilityZone + + + Count + + + CurrentOrchestratorVersion + + + EnableAutoScaling + + + EnableEncryptionAtHost + + + EnableFips + + + EnableNodePublicIP + + + EnableUltraSsd + + + GpuInstanceProfile + + + HostGroupId + + + KubeletDiskType + + + MaxCount + + + MaxPod + + + MinCount + + + Mode + + + NodeImageVersion + + + NodePublicIPPrefixId + + + NodeTaint + + + OSDiskSizeGb + + + OSDiskType + + + OSSku + + + OSType + + + OrchestratorVersion + + + PodSubnetId + + + ProvisioningState + + + ProximityPlacementGroupId + + + ScaleDownMode + + + ScaleSetEvictionPolicy + + + ScaleSetPriority + + + SpotMaxPrice + + + VMSize + + + VnetSubnetId + + + WorkloadRuntime + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabels + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabels + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTags + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTags + + + + + + + + + + + + Item + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterApiServerAccessProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterApiServerAccessProfile + + + + + + + + + + + + + + + + + + + + + + + + AuthorizedIPRange + + + DisableRunCommand - ProvisioningState + EnablePrivateCluster + + + EnablePrivateClusterPublicFqdn + + + PrivateDnsZone + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAutoUpgradeProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAutoUpgradeProfile + + + + + + + + + + + + UpgradeChannel + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetrics + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetrics + + + + + + + + + + + + + + + MetricAnnotationsAllowList + + + MetricLabelsAllowlist + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetrics + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetrics + + + + + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterHttpProxyConfig + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterHttpProxyConfig + + + + + + + + + + + + + + + + + + + + + HttpProxy + + + HttpsProxy + + + NoProxy + + + TrustedCa + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentity + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentity + + + + + + + + + + + + + + + PrincipalId + + + TenantId + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterListResult + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterListResult + + + + + + + + + + + + NextLink + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfile + + + + + + + + + + + + + + + + + + AllocatedOutboundPort + + + EnableMultipleStandardLoadBalancer - ServicePrincipalProfileClientId + IdleTimeoutInMinute + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileManagedOutboundIPs + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileManagedOutboundIPs + + + + + + + + + + + + + - ServicePrincipalProfileSecret + Count - WindowProfileAdminPassword + CountIPv6 + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterManagedOutboundIPProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterManagedOutboundIPProfile + + + + + + + + + + - WindowProfileAdminUsername + Count + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterNatGatewayProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterNatGatewayProfile + + + + + + + + + + - WindowProfileLicenseType + IdleTimeoutInMinute @@ -926,57 +2464,67 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterOidcIssuerProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterOidcIssuerProfile - - - - + - + + + + + + + Enabled + + + IssuerUrl + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentity + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentity + + + - + - + - + - + - AdminGroupObjectID - - - ClientAppId - - - EnableAzureRbac - - - Managed + BindingSelector - ServerAppId + Name - ServerAppSecret + Namespace - TenantId + ProvisioningState @@ -984,27 +2532,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAccessProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityException - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAccessProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityException - + - + - Location + Name - Name + Namespace @@ -1012,21 +2560,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionPodLabels - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionPodLabels - + - Enabled + Item @@ -1034,21 +2582,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfileConfig + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfileConfig + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProfile - + + + + - Item + AllowNetworkPluginKubenet + + + Enabled @@ -1056,33 +2610,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfileIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBody - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfileIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBody - + - + - + - ClientId + Code - ObjectId + Message - ResourceId + Target @@ -1090,159 +2644,167 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfile - - - - - - - - - - - - - + - + - + + + + + + + KubernetesVersion + + + Name + + + OSType + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileUpgradesItem + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileUpgradesItem + + + - + - + + + + + + + IsPreview + + + KubernetesVersion + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterProperties + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterProperties + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - AvailabilityZone - - - Count - - - EnableAutoScaling + AzurePortalFqdn - EnableNodePublicIP + CurrentKubernetesVersion - MaxCount + DisableLocalAccount - MaxPod + DiskEncryptionSetId - MinCount + DnsPrefix - Mode + EnablePodSecurityPolicy - NodeImageVersion + EnableRbac - NodeTaint + Fqdn - OSDiskSizeGb + FqdnSubdomain - OSDiskType + KubernetesVersion - OSType + MaxAgentPool - OrchestratorVersion + NodeResourceGroup - PowerStateCode + PrivateFqdn ProvisioningState - ProximityPlacementGroupId - - - ScaleSetEvictionPolicy - - - ScaleSetPriority - - - SpotMaxPrice - - - UpgradeSettingMaxSurge - - - VMSize - - - VnetSubnetId - - - Name + PublicNetworkAccess @@ -1250,141 +2812,189 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileProperties + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAutoScalerProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileProperties + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAutoScalerProfile - - - - - - - - - - - - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - AvailabilityZone + BalanceSimilarNodeGroup - Count + Expander - EnableAutoScaling + MaxEmptyBulkDelete - EnableNodePublicIP + MaxGracefulTerminationSec - MaxCount + MaxNodeProvisionTime - MaxPod + MaxTotalUnreadyPercentage - MinCount + NewPodScaleUpDelay - Mode + OkTotalUnreadyCount - NodeImageVersion + ScaleDownDelayAfterAdd - NodeTaint + ScaleDownDelayAfterDelete - OSDiskSizeGb + ScaleDownDelayAfterFailure - OSDiskType + ScaleDownUnneededTime - OSType + ScaleDownUnreadyTime - OrchestratorVersion + ScaleDownUtilizationThreshold - ProvisioningState + ScanInterval - ProximityPlacementGroupId + SkipNodesWithLocalStorage - ScaleSetEvictionPolicy + SkipNodesWithSystemPod + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefender + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefender + + + + + + + + + + - ScaleSetPriority + LogAnalyticsWorkspaceResourceId + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoring + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoring + + + + + + + + + + - SpotMaxPrice + Enabled + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleaner + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleaner + + + + + + + + + + + + + - VMSize + Enabled - VnetSubnetId + IntervalHour @@ -1392,21 +3002,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabels + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentity - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabels + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentity - + - Item + Enabled @@ -1414,21 +3024,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTags + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterServicePrincipalProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTags + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterServicePrincipalProfile - + + + + - Item + ClientId + + + Secret @@ -1436,27 +3052,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSku - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSku - + - + - AuthorizedIPRange + Name - EnablePrivateCluster + Tier @@ -1464,27 +3080,65 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriver - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriver - + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriver + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriver + + + - + - PrincipalId + Enabled + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriver + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriver + + + + + + + + + + - TenantId + Enabled @@ -1492,27 +3146,83 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentitiesValue + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotController - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentitiesValue + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotController - + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterUpgradeProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterUpgradeProfile + + + - + - ClientId + Name + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWindowsProfile + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWindowsProfile + + + + + + + + + + + + + + + + + + + + + AdminPassword - PrincipalId + AdminUsername + + + EnableCsiProxy + + + LicenseType @@ -1520,21 +3230,49 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterListResult + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKeda - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterListResult + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKeda - + + + + + + + + Enabled + + + + + + + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedServiceIdentityUserAssignedIdentitiesValue + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedServiceIdentityUserAssignedIdentitiesValue + + + + + + + + - NextLink + ClientId + + + PrincipalId @@ -1542,27 +3280,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValue - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValue - + - + - AllocatedOutboundPort + Name - IdleTimeoutInMinute + Origin @@ -1570,21 +3308,39 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPs + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValueDisplay - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPs + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValueDisplay - + + + + + + + + + + - Count + Description + + + Operation + + + Provider + + + Resource @@ -1592,61 +3348,49 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionProfile - - - - - - - - KubernetesVersion - Name - - OSType - - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileUpgradesItem + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionProperty - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileUpgradesItem + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionProperty - + - + - IsPreview + EnableFipsImage - KubernetesVersion + OSType @@ -1654,75 +3398,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterProperties + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OutboundEnvironmentEndpoint - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterProperties + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OutboundEnvironmentEndpoint - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - DiskEncryptionSetId - - - DnsPrefix - - - EnablePodSecurityPolicy - - - EnableRbac - - - Fqdn - - - KubernetesVersion - - - MaxAgentPool - - - NodeResourceGroup - - - PrivateFqdn - - - ProvisioningState + Category @@ -1730,111 +3420,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OutboundEnvironmentEndpointCollection - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OutboundEnvironmentEndpointCollection - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - BalanceSimilarNodeGroup - - - Expander - - - MaxEmptyBulkDelete - - - MaxGracefulTerminationSec - - - MaxTotalUnreadyPercentage - - - NewPodScaleUpDelay - - - OkTotalUnreadyCount - - - ScaleDownDelayAfterAdd - - - ScaleDownDelayAfterDelete - - - ScaleDownDelayAfterFailure - - - ScaleDownUnneededTime - - - ScaleDownUnreadyTime - - - ScaleDownUtilizationThreshold - - - ScanInterval - - - SkipNodesWithLocalStorage - - - SkipNodesWithSystemPod + NextLink @@ -1842,33 +3442,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfileValue + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfileValue + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerState - - - - - - - + - ClientId - - - ObjectId - - - ResourceId + Code @@ -1876,27 +3464,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnection - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnection - - - - + - ClientId - - - Secret + Name @@ -1904,27 +3486,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterSku + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnectionProperties - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterSku + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnectionProperties - - - - + - Name - - - Tier + ProvisioningState @@ -1932,55 +3508,67 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterUpgradeProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkResource - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterUpgradeProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkResource + + + + + + + + + + + GroupId + Name + + PrivateLinkServiceId + + + RequiredMember + - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkServiceConnectionState - - - - + - + - AdminPassword - - - AdminUsername + Description - LicenseType + Status @@ -1988,27 +3576,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValue + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.RunCommandRequest - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValue + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.RunCommandRequest - + - + + + + - Name + ClusterToken - Origin + Command + + + Context @@ -2016,39 +3610,63 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValueDisplay + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.Snapshot - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValueDisplay + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.Snapshot - + - + - + - + + + + + + + + + + + + + - Description + Location - Operation + Name - Provider + SystemDataCreatedAt - Resource + SystemDataCreatedBy + + + SystemDataCreatedByType + + + SystemDataLastModifiedAt + + + SystemDataLastModifiedBy + + + SystemDataLastModifiedByType @@ -2056,21 +3674,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotListResult - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotListResult - + - Code + NextLink @@ -2078,21 +3696,57 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnection + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotProperties - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnection + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotProperties - + + + + + + + + + + + + + + + + + + + - Name + EnableFips + + + KubernetesVersion + + + NodeImageVersion + + + OSSku + + + OSType + + + SnapshotType + + + VMSize @@ -2100,21 +3754,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnectionProperties + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SubResource - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnectionProperties + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SubResource - + - ProvisioningState + Name @@ -2122,39 +3776,183 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkResource + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfig - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkResource + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfig - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - GroupId + FsAioMaxNr - Name + FsFileMax - PrivateLinkServiceId + FsInotifyMaxUserWatch - RequiredMember + FsNrOpen + + + KernelThreadsMax + + + NetCoreNetdevMaxBacklog + + + NetCoreOptmemMax + + + NetCoreRmemDefault + + + NetCoreRmemMax + + + NetCoreSomaxconn + + + NetCoreWmemDefault + + + NetCoreWmemMax + + + NetIpv4IPLocalPortRange + + + NetIpv4NeighDefaultGcThresh1 + + + NetIpv4NeighDefaultGcThresh2 + + + NetIpv4NeighDefaultGcThresh3 + + + NetIpv4TcpFinTimeout + + + NetIpv4TcpKeepaliveProbe + + + NetIpv4TcpKeepaliveTime + + + NetIpv4TcpMaxSynBacklog + + + NetIpv4TcpMaxTwBucket + + + NetIpv4TcpTwReuse + + + NetIpv4TcpkeepaliveIntvl + + + NetNetfilterNfConntrackBucket + + + NetNetfilterNfConntrackMax + + + VMMaxMapCount + + + VMSwappiness + + + VMVfsCachePressure @@ -2162,27 +3960,21 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkServiceConnectionState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TagsObjectTags - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkServiceConnectionState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TagsObjectTags - - - - + - Description - - - Status + Item @@ -2190,27 +3982,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.Resource + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.Resource + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek - + - + - Location + Day - Name + HourSlot @@ -2218,43 +4010,27 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTags + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTags + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan - + - - - - - - Item - - - - - - - - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.SubResource - - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.SubResource - - - - + - Name + End + + + Start @@ -2262,21 +4038,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.TagsObjectTags + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentity - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.TagsObjectTags + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentity - + + + + + + + - Item + ClientId + + + ObjectId + + + ResourceId @@ -2284,33 +4072,33 @@ - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfile - + - + - + - ClientId + DnsServer - ObjectId + Enabled - ResourceId + RootDomainName diff --git a/src/Aks/Aks.Autorest/Az.Aks.psd1 b/src/Aks/Aks.Autorest/Az.Aks.psd1 index 31ee435f4a42..447637ce34c3 100644 --- a/src/Aks/Aks.Autorest/Az.Aks.psd1 +++ b/src/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-AzAksNodePoolUpgradeProfile', 'Get-AzAksUpgradeProfile', 'Get-AzAksVersion', 'Start-AzAksCluster', 'Stop-AzAksCluster', '*' + 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', '*' AliasesToExport = 'Get-AzAksClusterUpgradeProfile', '*' PrivateData = @{ PSData = @{ diff --git a/src/Aks/Aks.Autorest/README.md b/src/Aks/Aks.Autorest/README.md index 2056bcfac0ce..95f8622698b0 100644 --- a/src/Aks/Aks.Autorest/README.md +++ b/src/Aks/Aks.Autorest/README.md @@ -30,12 +30,12 @@ For information on how to develop for `Az.Aks`, see [how-to.md](how-to.md). > see https://aka.ms/autorest ``` yaml -branch: e320555a456cbc894c5a89466defdfca45ca18a8 +branch: 6031674c73a95ffd60f58b5cdd633c94b3360467 require: - $(this-folder)/../../readme.azure.noprofile.md input-file: - - $(repo)/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2020-09-01/managedClusters.json - - $(repo)/specification/containerservice/resource-manager/Microsoft.ContainerService/stable/2019-08-01/location.json + - $(repo)/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2023-02-01/managedClusters.json + - $(repo)/specification/containerservice/resource-manager/Microsoft.ContainerService/aks/stable/2019-08-01/location.json title: Aks module-version: 0.1.0 @@ -50,6 +50,22 @@ directive: subject: ^ManagedCluster$ verb: Get|New|Set|Remove remove: true + - where: + variant: ^Create$|^CreateViaIdentity$|^CreateViaIdentityExpanded$|^Update$|^UpdateViaIdentity$|^Run$|^RunViaIdentity$ + subject: ^MaintenanceConfiguration$|^Snapshot$|^ManagedClusterCommand$|^SnapshotTag$ + remove: true + - where: + subject: ^MaintenanceConfiguration$|^Snapshot$ + verb: Set + remove: true +# this API (Update SnapshotTag) is defined in swagger but not supported by RP + - where: + subject: ^SnapshotTag$ + verb: Update + remove: true + - model-cmdlet: + - TimeSpan + - TimeInWeek - where: subject: ^ManagedCluster$ parameter-name: ResourceName diff --git a/src/Aks/Aks.Autorest/build-module.ps1 b/src/Aks/Aks.Autorest/build-module.ps1 index 274ba5b16cba..ec83938e700e 100644 --- a/src/Aks/Aks.Autorest/build-module.ps1 +++ b/src/Aks/Aks.Autorest/build-module.ps1 @@ -122,7 +122,11 @@ $examplesFolder = Join-Path $PSScriptRoot 'examples' $null = New-Item -ItemType Directory -Force -Path $examplesFolder Write-Host -ForegroundColor Green 'Creating cmdlets for specified models...' -$modelCmdlets = @() +$modelCmdlets = @('TimeSpan', 'TimeInWeek') +$modelCmdletFolder = Join-Path (Join-Path $PSScriptRoot './custom') 'autogen-model-cmdlets' +if (Test-Path $modelCmdletFolder) { + $null = Remove-Item -Force -Recurse -Path $modelCmdletFolder +} if ($modelCmdlets.Count -gt 0) { . (Join-Path $PSScriptRoot 'create-model-cmdlets.ps1') CreateModelCmdlet($modelCmdlets) diff --git a/src/Aks/Aks.Autorest/create-model-cmdlets.ps1 b/src/Aks/Aks.Autorest/create-model-cmdlets.ps1 index 783ea640fc7c..b18addf64f31 100644 --- a/src/Aks/Aks.Autorest/create-model-cmdlets.ps1 +++ b/src/Aks/Aks.Autorest/create-model-cmdlets.ps1 @@ -23,9 +23,13 @@ function CreateModelCmdlet { } $ModelCsPath = Join-Path (Join-Path $PSScriptRoot 'generated\api') 'Models' - $ModuleName = 'Aks' $OutputDir = Join-Path $PSScriptRoot 'custom\autogen-model-cmdlets' $null = New-Item -ItemType Directory -Force -Path $OutputDir + if (''.length -gt 0) { + $ModuleName = '' + } else { + $ModuleName = 'Az.Aks' + } $CsFiles = Get-ChildItem -Path $ModelCsPath -Recurse -Filter *.cs $Content = '' @@ -64,10 +68,10 @@ function CreateModelCmdlet { $ObjectType = $Model $ObjectTypeWithNamespace = "${Namespace}.${ObjectType}" # remove duplicated module name - if ($ObjectType.StartsWith($ModuleName)) { + if ($ObjectType.StartsWith('Aks')) { $ModulePrefix = '' } else { - $ModulePrefix = $ModuleName + $ModulePrefix = 'Aks' } $OutputPath = Join-Path -ChildPath "New-Az${ModulePrefix}${ObjectType}Object.ps1" -Path $OutputDir @@ -158,7 +162,7 @@ Create an in-memory object for ${ObjectType}. .Outputs ${ObjectTypeWithNamespace} .Link -https://learn.microsoft.com/powershell/module/az.${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object +https://learn.microsoft.com/powershell/module/${ModuleName}/new-Az${ModulePrefix}${ObjectType}Object #> function New-Az${ModulePrefix}${ObjectType}Object { [OutputType('${ObjectTypeWithNamespace}')] diff --git a/src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1 b/src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1 index 4a8ed94556b9..d5d66703e225 100644 --- a/src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1 +++ b/src/Aks/Aks.Autorest/custom/Install-AzAksCliTool.ps1 @@ -348,4 +348,4 @@ Function Install-Kubelogin } #endregion } -} \ No newline at end of file +} diff --git a/src/Aks/Aks.Autorest/custom/autogen-model-cmdlets/New-AzAksTimeInWeekObject.ps1 b/src/Aks/Aks.Autorest/custom/autogen-model-cmdlets/New-AzAksTimeInWeekObject.ps1 new file mode 100644 index 000000000000..d90a6f4c14f6 --- /dev/null +++ b/src/Aks/Aks.Autorest/custom/autogen-model-cmdlets/New-AzAksTimeInWeekObject.ps1 @@ -0,0 +1,54 @@ + +# ---------------------------------------------------------------------------------- +# 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 an in-memory object for TimeInWeek. +.Description +Create an in-memory object for TimeInWeek. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek +.Link +https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeInWeekObject +#> +function New-AzAksTimeInWeekObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The day of the week.")] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay])] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay] + $Day, + [Parameter(HelpMessage="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.")] + [int[]] + $HourSlot + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek]::New() + + if ($PSBoundParameters.ContainsKey('Day')) { + $Object.Day = $Day + } + if ($PSBoundParameters.ContainsKey('HourSlot')) { + $Object.HourSlot = $HourSlot + } + return $Object + } +} + diff --git a/src/Aks/Aks.Autorest/custom/autogen-model-cmdlets/New-AzAksTimeSpanObject.ps1 b/src/Aks/Aks.Autorest/custom/autogen-model-cmdlets/New-AzAksTimeSpanObject.ps1 new file mode 100644 index 000000000000..3b26eb74c7f5 --- /dev/null +++ b/src/Aks/Aks.Autorest/custom/autogen-model-cmdlets/New-AzAksTimeSpanObject.ps1 @@ -0,0 +1,53 @@ + +# ---------------------------------------------------------------------------------- +# 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 an in-memory object for TimeSpan. +.Description +Create an in-memory object for TimeSpan. + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan +.Link +https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeSpanObject +#> +function New-AzAksTimeSpanObject { + [OutputType('Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan')] + [CmdletBinding(PositionalBinding=$false)] + Param( + + [Parameter(HelpMessage="The end of a time span.")] + [System.DateTime] + $End, + [Parameter(HelpMessage="The start of a time span.")] + [System.DateTime] + $Start + ) + + process { + $Object = [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan]::New() + + if ($PSBoundParameters.ContainsKey('End')) { + $Object.End = $End + } + if ($PSBoundParameters.ContainsKey('Start')) { + $Object.Start = $Start + } + return $Object + } +} + diff --git a/src/Aks/Aks.Autorest/docs/Az.Aks.md b/src/Aks/Aks.Autorest/docs/Az.Aks.md index 808f4c10bc8a..eba009aaab34 100644 --- a/src/Aks/Aks.Autorest/docs/Az.Aks.md +++ b/src/Aks/Aks.Autorest/docs/Az.Aks.md @@ -11,11 +11,27 @@ Locale: en-US Microsoft Azure PowerShell: Aks cmdlets ## Az.Aks Cmdlets +### [Get-AzAksMaintenanceConfiguration](Get-AzAksMaintenanceConfiguration.md) +Gets the specified maintenance configuration of a managed cluster. + +### [Get-AzAksManagedClusterCommandResult](Get-AzAksManagedClusterCommandResult.md) +Gets the results of a command which has been run on the Managed Cluster. + +### [Get-AzAksManagedClusterOSOption](Get-AzAksManagedClusterOSOption.md) +Gets supported OS options in the specified subscription. + +### [Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint](Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md) +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. + ### [Get-AzAksNodePoolUpgradeProfile](Get-AzAksNodePoolUpgradeProfile.md) -Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. +Gets the upgrade profile for an agent pool. + +### [Get-AzAksSnapshot](Get-AzAksSnapshot.md) +Gets a snapshot. ### [Get-AzAksUpgradeProfile](Get-AzAksUpgradeProfile.md) -Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. +Gets the upgrade profile of a managed cluster. ### [Get-AzAksVersion](Get-AzAksVersion.md) List available version for creating managed Kubernetes cluster. @@ -24,9 +40,48 @@ The operation returns properties of each orchestrator including version, availab ### [Install-AzAksCliTool](Install-AzAksCliTool.md) Download and install kubectl and kubelogin. +### [Invoke-AzAksAbortAgentPoolLatestOperation](Invoke-AzAksAbortAgentPoolLatestOperation.md) +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. + +### [Invoke-AzAksAbortManagedClusterLatestOperation](Invoke-AzAksAbortManagedClusterLatestOperation.md) +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. + +### [Invoke-AzAksRotateManagedClusterServiceAccountSigningKey](Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md) +Rotates the service account signing keys of a managed cluster. + +### [New-AzAksMaintenanceConfiguration](New-AzAksMaintenanceConfiguration.md) +Creates or updates a maintenance configuration in the specified managed cluster. + +### [New-AzAksSnapshot](New-AzAksSnapshot.md) +Creates or updates a snapshot. + +### [New-AzAksTimeInWeekObject](New-AzAksTimeInWeekObject.md) +Create an in-memory object for TimeInWeek. + +### [New-AzAksTimeSpanObject](New-AzAksTimeSpanObject.md) +Create an in-memory object for TimeSpan. + +### [Remove-AzAksMaintenanceConfiguration](Remove-AzAksMaintenanceConfiguration.md) +Deletes a maintenance configuration. + +### [Remove-AzAksSnapshot](Remove-AzAksSnapshot.md) +Deletes a snapshot. + ### [Start-AzAksCluster](Start-AzAksCluster.md) -Starts a Stopped Managed Cluster +See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + +### [Start-AzAksManagedClusterCommand](Start-AzAksManagedClusterCommand.md) +AKS will create a pod to run the command. +This is primarily useful for private clusters. +For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). ### [Stop-AzAksCluster](Stop-AzAksCluster.md) -Stops a Running Managed Cluster +This can only be performed on Azure Virtual Machine Scale set backed clusters. +Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. +A cluster does not accrue charges while it is stopped. +See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksMaintenanceConfiguration.md b/src/Aks/Aks.Autorest/docs/Get-AzAksMaintenanceConfiguration.md new file mode 100644 index 000000000000..bca654f0b293 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Get-AzAksMaintenanceConfiguration.md @@ -0,0 +1,209 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/get-azaksmaintenanceconfiguration +schema: 2.0.0 +--- + +# Get-AzAksMaintenanceConfiguration + +## SYNOPSIS +Gets the specified maintenance configuration of a managed cluster. + +## SYNTAX + +### List (Default) +``` +Get-AzAksMaintenanceConfiguration -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzAksMaintenanceConfiguration -ConfigName -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzAksMaintenanceConfiguration -InputObject [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets the specified maintenance configuration of a managed cluster. + +## EXAMPLES + +### Example 1: List all maintenance configurations for a managed cluster +```powershell +Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster +``` + +```output +Name +---- +aks_maintenance_config1 +aks_maintenance_config2 +``` + +List all maintenance configurations for a managed cluster "myCluster". + +### Example 2: Get a maintenance configuration with its config name +```powershell +Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' +``` + +```output +Name +---- +aks_maintenance_config1 +``` + +Get a maintenance configuration with name "aks_maintenance_config" for a managed cluster "myCluster". + +### Example 3: Get a maintenance configuration via identity +```powershell +$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 +``` + +```output +Name +---- +aks_maintenance_config +``` + +Get a maintenance configuration via identity for a managed cluster "myCluster". + +## PARAMETERS + +### -ConfigName +The name of the maintenance configuration. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Get, List +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterCommandResult.md b/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterCommandResult.md new file mode 100644 index 000000000000..7f0a4f159e49 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterCommandResult.md @@ -0,0 +1,195 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustercommandresult +schema: 2.0.0 +--- + +# Get-AzAksManagedClusterCommandResult + +## SYNOPSIS +Gets the results of a command which has been run on the Managed Cluster. + +## SYNTAX + +### Get (Default) +``` +Get-AzAksManagedClusterCommandResult -CommandId -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [] +``` + +### GetViaIdentity +``` +Get-AzAksManagedClusterCommandResult -InputObject [-DefaultProfile ] [-PassThru] + [] +``` + +## DESCRIPTION +Gets the results of a command which has been run on the Managed Cluster. + +## EXAMPLES + +### Example 1: Get the results of a command which has been run on the Managed Cluster. +```powershell +Get-AzAksManagedClusterCommandResult -ResourceGroupName mygroup -ResourceName mycluster -CommandId '706de66629b14267b4962cf015122c12' +``` + +```output +ExitCode : 0 +FinishedAt : 3/31/2023 9:14:40 AM +Id : 706de66629b14267b4962cf015122c12 +Log : NAME STATUS ROLES AGE VERSION + aks-default-40136599-vmss000000 Ready agent 68m v1.24.9 + aks-pool2-22198594-vmss000000 Ready agent 65m v1.24.9 + +ProvisioningState : Succeeded +Reason : +StartedAt : 3/31/2023 9:14:38 AM +``` + + + +## PARAMETERS + +### -CommandId +Id of the command. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOSOption.md b/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOSOption.md new file mode 100644 index 000000000000..84d28da041bb --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOSOption.md @@ -0,0 +1,157 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusterosoption +schema: 2.0.0 +--- + +# Get-AzAksManagedClusterOSOption + +## SYNOPSIS +Gets supported OS options in the specified subscription. + +## SYNTAX + +### Get (Default) +``` +Get-AzAksManagedClusterOSOption -Location [-SubscriptionId ] [-ResourceType ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzAksManagedClusterOSOption -InputObject [-ResourceType ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets supported OS options in the specified subscription. + +## EXAMPLES + +### Example 1: Get supported OS options +```powershell +Get-AzAksManagedClusterOSOption -Location eastus +``` + +```output +Name +---- +default +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of Azure region. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceType +The resource type for which the OS options needs to be returned + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md b/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md new file mode 100644 index 000000000000..314783cec134 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md @@ -0,0 +1,124 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusteroutboundnetworkdependencyendpoint +schema: 2.0.0 +--- + +# Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint + +## 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. + +## SYNTAX + +``` +Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## 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. + +## EXAMPLES + +### Example 1: List egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster +```powershell +$result = Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint -ResourceGroupName mygroup -ResourceName mycluster +$result | select Category,Endpoint +``` + +```output +Category Endpoint +-------- -------- +azure-resource-management {management.azure.com, login.microsoftonline.com} +images {mcr.microsoft.com, *.data.mcr.microsoft.com} +artifacts {packages.microsoft.com, acs-mirror.azureedge.net} +time-sync {ntp.ubuntu.com} +ubuntu-optional {security.ubuntu.com, azure.archive.ubuntu.com, changelogs.ubuntu.com} +apiserver {aks0b1f-idb7vuoi.hcp.eastus.azmk8s.io} +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksNodePoolUpgradeProfile.md b/src/Aks/Aks.Autorest/docs/Get-AzAksNodePoolUpgradeProfile.md index 2057211f7e67..abee68231ea7 100644 --- a/src/Aks/Aks.Autorest/docs/Get-AzAksNodePoolUpgradeProfile.md +++ b/src/Aks/Aks.Autorest/docs/Get-AzAksNodePoolUpgradeProfile.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Get-AzAksNodePoolUpgradeProfile ## SYNOPSIS -Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. +Gets the upgrade profile for an agent pool. ## SYNTAX @@ -24,7 +24,7 @@ Get-AzAksNodePoolUpgradeProfile -InputObject [-DefaultProfile `: 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 a supported Azure region. + - `[Location ]`: The name of Azure region. - `[PrivateEndpointConnectionName ]`: The name of the private endpoint connection. - - `[ResourceGroupName ]`: The name of the resource group. + - `[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 ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksSnapshot.md b/src/Aks/Aks.Autorest/docs/Get-AzAksSnapshot.md new file mode 100644 index 000000000000..8667cd4ff465 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Get-AzAksSnapshot.md @@ -0,0 +1,212 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/get-azakssnapshot +schema: 2.0.0 +--- + +# Get-AzAksSnapshot + +## SYNOPSIS +Gets a snapshot. + +## SYNTAX + +### List (Default) +``` +Get-AzAksSnapshot [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzAksSnapshot -ResourceGroupName -ResourceName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzAksSnapshot -InputObject [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzAksSnapshot -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +## DESCRIPTION +Gets a snapshot. + +## EXAMPLES + +### Example 1: List all AKS snapshots +```powershell +Get-AzAksSnapshot +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +eastus snapshot2 3/30/2023 10:09:38 AM user1@microsoft.com User 3/30/2023 10:09:38 AM user1@microsoft.com User +eastus snapshot3 3/30/2023 10:11:24 AM user1@microsoft.com User 3/30/2023 10:11:24 AM user1@microsoft.com User +``` + + + +### Example 2: List all AKS snapshots in a resource group +```powershell +Get-AzAksSnapshot -ResourceGroupName mygroup +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +eastus snapshot2 3/30/2023 10:09:38 AM user1@microsoft.com User 3/30/2023 10:09:38 AM user1@microsoft.com User +``` + + + +### Example 3: Get an AKS snapshot +```powershell +Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +``` + + + +### Example 4: Get an AKS snapshot via identity +```powershell +$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 +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get, List1 +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get, List, List1 +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksUpgradeProfile.md b/src/Aks/Aks.Autorest/docs/Get-AzAksUpgradeProfile.md index b4a5399d99d6..9cb709ed353d 100644 --- a/src/Aks/Aks.Autorest/docs/Get-AzAksUpgradeProfile.md +++ b/src/Aks/Aks.Autorest/docs/Get-AzAksUpgradeProfile.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Get-AzAksUpgradeProfile ## SYNOPSIS -Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. +Gets the upgrade profile of a managed cluster. ## SYNTAX @@ -24,7 +24,7 @@ Get-AzAksUpgradeProfile -InputObject [-DefaultProfile ] ``` ## DESCRIPTION -Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. +Gets the upgrade profile of a managed cluster. ## EXAMPLES @@ -59,7 +59,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -91,6 +92,7 @@ Accept wildcard characters: False ### -ResourceGroupName The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -105,8 +107,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. +The ID of the target subscription. ```yaml Type: System.String[] @@ -129,7 +130,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile ## NOTES @@ -144,13 +145,15 @@ To create the parameters described below, construct a hash table containing the `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 a supported Azure region. + - `[Location ]`: The name of Azure region. - `[PrivateEndpointConnectionName ]`: The name of the private endpoint connection. - - `[ResourceGroupName ]`: The name of the resource group. + - `[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 ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/Aks/Aks.Autorest/docs/Get-AzAksVersion.md b/src/Aks/Aks.Autorest/docs/Get-AzAksVersion.md index e174d856c4cb..a8fed7a34be5 100644 --- a/src/Aks/Aks.Autorest/docs/Get-AzAksVersion.md +++ b/src/Aks/Aks.Autorest/docs/Get-AzAksVersion.md @@ -24,7 +24,7 @@ The operation returns properties of each orchestrator including version, availab ## EXAMPLES -### Example 1: List available version for creating managed Kubernetes cluster. +### Example 1: List available version for creating managed Kubernetes cluster ```powershell Get-AzAksVersion -location eastus ``` diff --git a/src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortAgentPoolLatestOperation.md b/src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortAgentPoolLatestOperation.md new file mode 100644 index 000000000000..52f9a46fd588 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortAgentPoolLatestOperation.md @@ -0,0 +1,250 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortagentpoollatestoperation +schema: 2.0.0 +--- + +# Invoke-AzAksAbortAgentPoolLatestOperation + +## 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. + +## SYNTAX + +### Abort (Default) +``` +Invoke-AzAksAbortAgentPoolLatestOperation -AgentPoolName -ResourceGroupName + -ResourceName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +### AbortViaIdentity +``` +Invoke-AzAksAbortAgentPoolLatestOperation -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## 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. + +## EXAMPLES + +### Example 1: Abort the currently running operation on the agent pool +```powershell +Invoke-AzAksAbortAgentPoolLatestOperation -ResourceGroupName mygroup -ResourceName mycluster -AgentPoolName 'pool1' +``` + +Abort the currently running operation on the agent pool "pool1". +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. + +## PARAMETERS + +### -AgentPoolName +The name of the agent pool. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: AbortViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortManagedClusterLatestOperation.md b/src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortManagedClusterLatestOperation.md new file mode 100644 index 000000000000..ae2ab6cc5053 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Invoke-AzAksAbortManagedClusterLatestOperation.md @@ -0,0 +1,235 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortmanagedclusterlatestoperation +schema: 2.0.0 +--- + +# Invoke-AzAksAbortManagedClusterLatestOperation + +## 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. + +## SYNTAX + +### Abort (Default) +``` +Invoke-AzAksAbortManagedClusterLatestOperation -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### AbortViaIdentity +``` +Invoke-AzAksAbortManagedClusterLatestOperation -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## 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. + +## EXAMPLES + +### Example 1: Abort the currently running operation on the managed cluster. +```powershell +Invoke-AzAksAbortManagedClusterLatestOperation -ResourceGroupName mygroup -ResourceName mycluster +``` + +Abort the currently running operation on the managed cluster "mycluster". +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. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: AbortViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md b/src/Aks/Aks.Autorest/docs/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md new file mode 100644 index 000000000000..5155e0c16cbc --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md @@ -0,0 +1,229 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksrotatemanagedclusterserviceaccountsigningkey +schema: 2.0.0 +--- + +# Invoke-AzAksRotateManagedClusterServiceAccountSigningKey + +## SYNOPSIS +Rotates the service account signing keys of a managed cluster. + +## SYNTAX + +### Rotate (Default) +``` +Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +### RotateViaIdentity +``` +Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -InputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Rotates the service account signing keys of a managed cluster. + +## EXAMPLES + +### Example 1: Rotates the service account signing keys of a managed cluster +```powershell +Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -ResourceGroupName mygroup -ResourceName mycluster +``` + + + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: RotateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Rotate +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Rotate +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Rotate +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/New-AzAksMaintenanceConfiguration.md b/src/Aks/Aks.Autorest/docs/New-AzAksMaintenanceConfiguration.md new file mode 100644 index 000000000000..42b9d6ca32da --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/New-AzAksMaintenanceConfiguration.md @@ -0,0 +1,210 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/new-azaksmaintenanceconfiguration +schema: 2.0.0 +--- + +# New-AzAksMaintenanceConfiguration + +## SYNOPSIS +Creates or updates a maintenance configuration in the specified managed cluster. + +## SYNTAX + +``` +New-AzAksMaintenanceConfiguration -ConfigName -ResourceGroupName -ResourceName + [-SubscriptionId ] [-NotAllowedTime ] [-TimeInWeek ] + [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a maintenance configuration in the specified managed cluster. + +## EXAMPLES + +### Example 1: Creates or updates a maintenance configuration in the specified managed cluster +```powershell +$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 +``` + +```output +Name +---- +aks_maintenance_config +``` + +Create a maintenance configuration "aks_maintenance_config" in a managed cluster "myCluster" with a time in week and a not allowed time span. + +## PARAMETERS + +### -ConfigName +The name of the maintenance configuration. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NotAllowedTime +Time slots on which upgrade is not allowed. +To construct, see NOTES section for NOTALLOWEDTIME properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimeInWeek +If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. +To construct, see NOTES section for TIMEINWEEK properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/New-AzAksSnapshot.md b/src/Aks/Aks.Autorest/docs/New-AzAksSnapshot.md new file mode 100644 index 000000000000..39a14b730964 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/New-AzAksSnapshot.md @@ -0,0 +1,211 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/new-azakssnapshot +schema: 2.0.0 +--- + +# New-AzAksSnapshot + +## SYNOPSIS +Creates or updates a snapshot. + +## SYNTAX + +``` +New-AzAksSnapshot -ResourceGroupName -ResourceName -Location + [-SubscriptionId ] [-CreationDataSourceResourceId ] [-SnapshotType ] + [-Tag ] [-DefaultProfile ] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Creates or updates a snapshot. + +## EXAMPLES + +### Example 1: Creates or updates a snapshot +```powershell +$pool = Get-AzAksNodePool -ResourceGroupName mygroup -ClusterName mycluster -Name default +New-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -Location eastus -SnapshotType 'NodePool' -CreationDataSourceResourceId $pool.Id +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:24:43 AM user1@microsoft.com User 3/30/2023 10:24:43 AM user1@microsoft.com User + +``` + +Creates or updates a snapshot for a nodepool "default" of a managed cluster "mycluster". + +## PARAMETERS + +### -CreationDataSourceResourceId +This is the ARM ID of the source object to be used to create the target object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SnapshotType +The type of a snapshot. +The default is NodePool. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/New-AzAksTimeInWeekObject.md b/src/Aks/Aks.Autorest/docs/New-AzAksTimeInWeekObject.md new file mode 100644 index 000000000000..f99c24e025d9 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/New-AzAksTimeInWeekObject.md @@ -0,0 +1,87 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeInWeekObject +schema: 2.0.0 +--- + +# New-AzAksTimeInWeekObject + +## SYNOPSIS +Create an in-memory object for TimeInWeek. + +## SYNTAX + +``` +New-AzAksTimeInWeekObject [-Day ] [-HourSlot ] [] +``` + +## DESCRIPTION +Create an in-memory object for TimeInWeek. + +## EXAMPLES + +### Example 1: Create an in-memory object for time in a week +```powershell +New-AzAksTimeInWeekObject -Day 'Sunday' -HourSlot 1,2 +``` + +```output +Day HourSlot +--- -------- +Sunday {1, 2} +``` + +*New-AzAksTimeInWeekObject* creates an in-memory object of type *TimeInWeek*. +This object represents time in a week. +and will be used for parameter *TimeInWeek* in cmdlet *New-AzAksMaintenanceConfiguration*. + +## PARAMETERS + +### -Day +The day of the week. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -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. + +```yaml +Type: System.Int32[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/New-AzAksTimeSpanObject.md b/src/Aks/Aks.Autorest/docs/New-AzAksTimeSpanObject.md new file mode 100644 index 000000000000..e26171023804 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/New-AzAksTimeSpanObject.md @@ -0,0 +1,86 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeSpanObject +schema: 2.0.0 +--- + +# New-AzAksTimeSpanObject + +## SYNOPSIS +Create an in-memory object for TimeSpan. + +## SYNTAX + +``` +New-AzAksTimeSpanObject [-End ] [-Start ] [] +``` + +## DESCRIPTION +Create an in-memory object for TimeSpan. + +## EXAMPLES + +### Example 1: Create Create an in-memory object for a time span +```powershell +$startDate = Get-Date -Year 2023 -Month 3 -Day 1 +$endDate = Get-Date -Year 2023 -Month 3 -Day 2 +New-AzAksTimeSpanObject -Start $startDate -End $endDate +``` + +```output +End Start +--- ----- +3/2/2023 1:53:53 PM 3/1/2023 1:53:45 PM +``` + +*New-AzAksTimeSpanObject* creates an in-memory object of type *TimeSpan*. +This object represents a time span and will be used for parameter *NotAllowedTime* in cmdlet *New-AzAksMaintenanceConfiguration*. + +## PARAMETERS + +### -End +The end of a time span. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Start +The start of a time span. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan + +## NOTES + +ALIASES + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Remove-AzAksMaintenanceConfiguration.md b/src/Aks/Aks.Autorest/docs/Remove-AzAksMaintenanceConfiguration.md new file mode 100644 index 000000000000..9c29018f842a --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Remove-AzAksMaintenanceConfiguration.md @@ -0,0 +1,221 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/remove-azaksmaintenanceconfiguration +schema: 2.0.0 +--- + +# Remove-AzAksMaintenanceConfiguration + +## SYNOPSIS +Deletes a maintenance configuration. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzAksMaintenanceConfiguration -ConfigName -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzAksMaintenanceConfiguration -InputObject [-DefaultProfile ] [-PassThru] + [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +Deletes a maintenance configuration. + +## EXAMPLES + +### Example 1: Remove a maintenance configuration +```powershell +Remove-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName mycluster -ConfigName 'aks_maintenance_config' +``` + + + +### Example 2: Remove a maintenance configuration via identity +```powershell +$MaintenanceConfig = Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' +$MaintenanceConfig | Remove-AzAksMaintenanceConfiguration +``` + + + +## PARAMETERS + +### -ConfigName +The name of the maintenance configuration. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Remove-AzAksSnapshot.md b/src/Aks/Aks.Autorest/docs/Remove-AzAksSnapshot.md new file mode 100644 index 000000000000..fca649e59f88 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Remove-AzAksSnapshot.md @@ -0,0 +1,206 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/remove-azakssnapshot +schema: 2.0.0 +--- + +# Remove-AzAksSnapshot + +## SYNOPSIS +Deletes a snapshot. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzAksSnapshot -ResourceGroupName -ResourceName [-SubscriptionId ] + [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] [] +``` + +### DeleteViaIdentity +``` +Remove-AzAksSnapshot -InputObject [-DefaultProfile ] [-PassThru] [-Confirm] [-WhatIf] + [] +``` + +## DESCRIPTION +Deletes a snapshot. + +## EXAMPLES + +### Example 1: Remove an AKS snapshot +```powershell +Remove-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +``` + + + +### Example 2: Remove an AKS snapshot via identity +```powershell +$Snapshot = Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +$Snapshot | Remove-AzAksSnapshot +``` + + + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Start-AzAksCluster.md b/src/Aks/Aks.Autorest/docs/Start-AzAksCluster.md index 290689e6eae0..58f954cd88d8 100644 --- a/src/Aks/Aks.Autorest/docs/Start-AzAksCluster.md +++ b/src/Aks/Aks.Autorest/docs/Start-AzAksCluster.md @@ -8,7 +8,7 @@ schema: 2.0.0 # Start-AzAksCluster ## SYNOPSIS -Starts a Stopped Managed Cluster +See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. ## SYNTAX @@ -25,7 +25,7 @@ Start-AzAksCluster -InputObject [-DefaultProfile ] [-As ``` ## DESCRIPTION -Starts a Stopped Managed Cluster +See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. ## EXAMPLES @@ -61,7 +61,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -138,6 +139,7 @@ Accept wildcard characters: False ### -ResourceGroupName The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -152,8 +154,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. +The ID of the target subscription. ```yaml Type: System.String @@ -220,13 +221,15 @@ To create the parameters described below, construct a hash table containing the `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 a supported Azure region. + - `[Location ]`: The name of Azure region. - `[PrivateEndpointConnectionName ]`: The name of the private endpoint connection. - - `[ResourceGroupName ]`: The name of the resource group. + - `[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 ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/Aks/Aks.Autorest/docs/Start-AzAksManagedClusterCommand.md b/src/Aks/Aks.Autorest/docs/Start-AzAksManagedClusterCommand.md new file mode 100644 index 000000000000..f62493b87270 --- /dev/null +++ b/src/Aks/Aks.Autorest/docs/Start-AzAksManagedClusterCommand.md @@ -0,0 +1,298 @@ +--- +external help file: +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/start-azaksmanagedclustercommand +schema: 2.0.0 +--- + +# Start-AzAksManagedClusterCommand + +## SYNOPSIS +AKS will create a pod to run the command. +This is primarily useful for private clusters. +For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + +## SYNTAX + +### RunExpanded (Default) +``` +Start-AzAksManagedClusterCommand -ResourceGroupName -ResourceName -Command + [-SubscriptionId ] [-ClusterToken ] [-Context ] [-DefaultProfile ] [-AsJob] + [-NoWait] [-Confirm] [-WhatIf] [] +``` + +### RunViaIdentityExpanded +``` +Start-AzAksManagedClusterCommand -InputObject -Command [-ClusterToken ] + [-Context ] [-DefaultProfile ] [-AsJob] [-NoWait] [-Confirm] [-WhatIf] [] +``` + +## DESCRIPTION +AKS will create a pod to run the command. +This is primarily useful for private clusters. +For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + +## EXAMPLES + +### Example 1: Run AKS command +```powershell +Start-AzAksManagedClusterCommand -ResourceGroupName mygroup -ResourceName mycluster -Command "kubectl get nodes" +``` + +```output +ExitCode : 0 +FinishedAt : 3/31/2023 8:52:17 AM +Id : 0a3991475d9744fcbfdc2595b40e517f +Log : NAME STATUS ROLES AGE VERSION + aks-default-40136599-vmss000000 Ready agent 46m v1.24.9 + aks-pool2-22198594-vmss000000 Ready agent 43m v1.24.9 + +ProvisioningState : Succeeded +Reason : +StartedAt : 3/31/2023 8:52:16 AM +``` + +AKS will create a pod to run the command. +This is primarily useful for private clusters. + +### Example 2: Run AKS command via identity +```powershell +$cluster = Get-AzAksCluster -ResourceGroupName mygroup -Name mycluster +$cluster | Start-AzAksManagedClusterCommand -Command "kubectl get nodes" +``` + +```output +ExitCode : 0 +FinishedAt : 3/31/2023 8:54:17 AM +Id : 0a3991475d9744fcbfdc2595b40e517f +Log : NAME STATUS ROLES AGE VERSION + aks-default-40136599-vmss000000 Ready agent 46m v1.24.9 + aks-pool2-22198594-vmss000000 Ready agent 43m v1.24.9 + +ProvisioningState : Succeeded +Reason : +StartedAt : 3/31/2023 8:54:16 AM +``` + + + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterToken +AuthToken issued for AKS AAD Server App. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Command +The command to run. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Context +A base64 encoded zip file containing the files required by the command. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: RunViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: RunExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: RunExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: RunExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult + +## NOTES + +ALIASES + +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. + +## RELATED LINKS + diff --git a/src/Aks/Aks.Autorest/docs/Stop-AzAksCluster.md b/src/Aks/Aks.Autorest/docs/Stop-AzAksCluster.md index f5a56f6c7373..9ed741537a77 100644 --- a/src/Aks/Aks.Autorest/docs/Stop-AzAksCluster.md +++ b/src/Aks/Aks.Autorest/docs/Stop-AzAksCluster.md @@ -8,7 +8,10 @@ schema: 2.0.0 # Stop-AzAksCluster ## SYNOPSIS -Stops a Running Managed Cluster +This can only be performed on Azure Virtual Machine Scale set backed clusters. +Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. +A cluster does not accrue charges while it is stopped. +See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. ## SYNTAX @@ -25,7 +28,10 @@ Stop-AzAksCluster -InputObject [-DefaultProfile ] [-AsJ ``` ## DESCRIPTION -Stops a Running Managed Cluster +This can only be performed on Azure Virtual Machine Scale set backed clusters. +Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. +A cluster does not accrue charges while it is stopped. +See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. ## EXAMPLES @@ -61,7 +67,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -138,6 +145,7 @@ Accept wildcard characters: False ### -ResourceGroupName The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -152,8 +160,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. +The ID of the target subscription. ```yaml Type: System.String @@ -220,13 +227,15 @@ To create the parameters described below, construct a hash table containing the `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 a supported Azure region. + - `[Location ]`: The name of Azure region. - `[PrivateEndpointConnectionName ]`: The name of the private endpoint connection. - - `[ResourceGroupName ]`: The name of the resource group. + - `[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 ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/Aks/Aks.Autorest/examples/Get-AzAksMaintenanceConfiguration.md b/src/Aks/Aks.Autorest/examples/Get-AzAksMaintenanceConfiguration.md new file mode 100644 index 000000000000..4c87b442e35a --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Get-AzAksMaintenanceConfiguration.md @@ -0,0 +1,44 @@ +### Example 1: List all maintenance configurations for a managed cluster +```powershell +Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster +``` + +```output +Name +---- +aks_maintenance_config1 +aks_maintenance_config2 +``` + +List all maintenance configurations for a managed cluster "myCluster". + +### Example 2: Get a maintenance configuration with its config name +```powershell +Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' +``` + +```output +Name +---- +aks_maintenance_config1 +``` + +Get a maintenance configuration with name "aks_maintenance_config" for a managed cluster "myCluster". + +### Example 3: Get a maintenance configuration via identity +```powershell +$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 +``` + +```output +Name +---- +aks_maintenance_config +``` + +Get a maintenance configuration via identity for a managed cluster "myCluster". + + diff --git a/src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterCommandResult.md b/src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterCommandResult.md new file mode 100644 index 000000000000..e8bd164cdc73 --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterCommandResult.md @@ -0,0 +1,19 @@ +### Example 1: Get the results of a command which has been run on the Managed Cluster. +```powershell +Get-AzAksManagedClusterCommandResult -ResourceGroupName mygroup -ResourceName mycluster -CommandId '706de66629b14267b4962cf015122c12' +``` + +```output +ExitCode : 0 +FinishedAt : 3/31/2023 9:14:40 AM +Id : 706de66629b14267b4962cf015122c12 +Log : NAME STATUS ROLES AGE VERSION + aks-default-40136599-vmss000000 Ready agent 68m v1.24.9 + aks-pool2-22198594-vmss000000 Ready agent 65m v1.24.9 + +ProvisioningState : Succeeded +Reason : +StartedAt : 3/31/2023 9:14:38 AM +``` + + diff --git a/src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterOSOption.md b/src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterOSOption.md new file mode 100644 index 000000000000..dbf9c25de5f8 --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterOSOption.md @@ -0,0 +1,12 @@ +### Example 1: Get supported OS options +```powershell +Get-AzAksManagedClusterOSOption -Location eastus +``` + +```output +Name +---- +default +``` + + diff --git a/src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md b/src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md new file mode 100644 index 000000000000..69c9a30052a6 --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md @@ -0,0 +1,18 @@ +### Example 1: List egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster +```powershell +$result = Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint -ResourceGroupName mygroup -ResourceName mycluster +$result | select Category,Endpoint +``` + +```output +Category Endpoint +-------- -------- +azure-resource-management {management.azure.com, login.microsoftonline.com} +images {mcr.microsoft.com, *.data.mcr.microsoft.com} +artifacts {packages.microsoft.com, acs-mirror.azureedge.net} +time-sync {ntp.ubuntu.com} +ubuntu-optional {security.ubuntu.com, azure.archive.ubuntu.com, changelogs.ubuntu.com} +apiserver {aks0b1f-idb7vuoi.hcp.eastus.azmk8s.io} +``` + + diff --git a/src/Aks/Aks.Autorest/examples/Get-AzAksNodePoolUpgradeProfile.md b/src/Aks/Aks.Autorest/examples/Get-AzAksNodePoolUpgradeProfile.md index bf68e7588241..52841ac21497 100644 --- a/src/Aks/Aks.Autorest/examples/Get-AzAksNodePoolUpgradeProfile.md +++ b/src/Aks/Aks.Autorest/examples/Get-AzAksNodePoolUpgradeProfile.md @@ -10,3 +10,5 @@ default Microsoft.ContainerService/managedClusters/agentPools/upgradeProfiles ``` Get Aks node pool upgrade profile with resource group name and cluster name. + + diff --git a/src/Aks/Aks.Autorest/examples/Get-AzAksSnapshot.md b/src/Aks/Aks.Autorest/examples/Get-AzAksSnapshot.md new file mode 100644 index 000000000000..c410e1302061 --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Get-AzAksSnapshot.md @@ -0,0 +1,50 @@ +### Example 1: List all AKS snapshots +```powershell +Get-AzAksSnapshot +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +eastus snapshot2 3/30/2023 10:09:38 AM user1@microsoft.com User 3/30/2023 10:09:38 AM user1@microsoft.com User +eastus snapshot3 3/30/2023 10:11:24 AM user1@microsoft.com User 3/30/2023 10:11:24 AM user1@microsoft.com User +``` + +### Example 2: List all AKS snapshots in a resource group +```powershell +Get-AzAksSnapshot -ResourceGroupName mygroup +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +eastus snapshot2 3/30/2023 10:09:38 AM user1@microsoft.com User 3/30/2023 10:09:38 AM user1@microsoft.com User +``` + +### Example 3: Get an AKS snapshot +```powershell +Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +``` + +### Example 4: Get an AKS snapshot via identity +```powershell +$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 +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +``` + + diff --git a/src/Aks/Aks.Autorest/examples/Get-AzAksUpgradeProfile.md b/src/Aks/Aks.Autorest/examples/Get-AzAksUpgradeProfile.md index 25365b2e0c36..a23f90c9fedd 100644 --- a/src/Aks/Aks.Autorest/examples/Get-AzAksUpgradeProfile.md +++ b/src/Aks/Aks.Autorest/examples/Get-AzAksUpgradeProfile.md @@ -10,3 +10,5 @@ default Microsoft.ContainerService/managedClusters/upgradeprofiles ``` Get Aks upgrade profile with resource group name and cluster name. + + diff --git a/src/Aks/Aks.Autorest/examples/Get-AzAksVersion.md b/src/Aks/Aks.Autorest/examples/Get-AzAksVersion.md index 715f8f744223..7f590503bb16 100644 --- a/src/Aks/Aks.Autorest/examples/Get-AzAksVersion.md +++ b/src/Aks/Aks.Autorest/examples/Get-AzAksVersion.md @@ -1,4 +1,4 @@ -### Example 1: List available version for creating managed Kubernetes cluster. +### Example 1: List available version for creating managed Kubernetes cluster ```powershell Get-AzAksVersion -location eastus ``` @@ -18,3 +18,4 @@ True Kubernetes 1.20.9 List available version for creating managed Kubernetes cluster. + diff --git a/src/Aks/Aks.Autorest/examples/Invoke-AzAksAbortAgentPoolLatestOperation.md b/src/Aks/Aks.Autorest/examples/Invoke-AzAksAbortAgentPoolLatestOperation.md new file mode 100644 index 000000000000..514d3f9f82b5 --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Invoke-AzAksAbortAgentPoolLatestOperation.md @@ -0,0 +1,8 @@ +### Example 1: Abort the currently running operation on the agent pool +```powershell +Invoke-AzAksAbortAgentPoolLatestOperation -ResourceGroupName mygroup -ResourceName mycluster -AgentPoolName 'pool1' +``` + +Abort the currently running operation on the agent pool "pool1". 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. + + diff --git a/src/Aks/Aks.Autorest/examples/Invoke-AzAksAbortManagedClusterLatestOperation.md b/src/Aks/Aks.Autorest/examples/Invoke-AzAksAbortManagedClusterLatestOperation.md new file mode 100644 index 000000000000..1b9f7ee0900b --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Invoke-AzAksAbortManagedClusterLatestOperation.md @@ -0,0 +1,8 @@ +### Example 1: Abort the currently running operation on the managed cluster. +```powershell +Invoke-AzAksAbortManagedClusterLatestOperation -ResourceGroupName mygroup -ResourceName mycluster +``` + +Abort the currently running operation on the managed cluster "mycluster". 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. + + diff --git a/src/Aks/Aks.Autorest/examples/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md b/src/Aks/Aks.Autorest/examples/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md new file mode 100644 index 000000000000..07f05b70d4fa --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md @@ -0,0 +1,6 @@ +### Example 1: Rotates the service account signing keys of a managed cluster +```powershell +Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -ResourceGroupName mygroup -ResourceName mycluster +``` + + diff --git a/src/Aks/Aks.Autorest/examples/New-AzAksMaintenanceConfiguration.md b/src/Aks/Aks.Autorest/examples/New-AzAksMaintenanceConfiguration.md new file mode 100644 index 000000000000..c5173298fe7a --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/New-AzAksMaintenanceConfiguration.md @@ -0,0 +1,16 @@ +### Example 1: Creates or updates a maintenance configuration in the specified managed cluster +```powershell +$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 +``` + +```output +Name +---- +aks_maintenance_config +``` + +Create a maintenance configuration "aks_maintenance_config" in a managed cluster "myCluster" with a time in week and a not allowed time span. + + diff --git a/src/Aks/Aks.Autorest/examples/New-AzAksSnapshot.md b/src/Aks/Aks.Autorest/examples/New-AzAksSnapshot.md new file mode 100644 index 000000000000..8afd924b4dea --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/New-AzAksSnapshot.md @@ -0,0 +1,16 @@ +### Example 1: Creates or updates a snapshot +```powershell +$pool = Get-AzAksNodePool -ResourceGroupName mygroup -ClusterName mycluster -Name default +New-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -Location eastus -SnapshotType 'NodePool' -CreationDataSourceResourceId $pool.Id +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:24:43 AM user1@microsoft.com User 3/30/2023 10:24:43 AM user1@microsoft.com User + +``` + +Creates or updates a snapshot for a nodepool "default" of a managed cluster "mycluster". + + diff --git a/src/Aks/Aks.Autorest/examples/New-AzAksTimeInWeekObject.md b/src/Aks/Aks.Autorest/examples/New-AzAksTimeInWeekObject.md new file mode 100644 index 000000000000..59b713ce9bbf --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/New-AzAksTimeInWeekObject.md @@ -0,0 +1,14 @@ +### Example 1: Create an in-memory object for time in a week +```powershell +New-AzAksTimeInWeekObject -Day 'Sunday' -HourSlot 1,2 +``` + +```output +Day HourSlot +--- -------- +Sunday {1, 2} +``` + +*New-AzAksTimeInWeekObject* creates an in-memory object of type *TimeInWeek*. This object represents time in a week. and will be used for parameter *TimeInWeek* in cmdlet *New-AzAksMaintenanceConfiguration*. + + diff --git a/src/Aks/Aks.Autorest/examples/New-AzAksTimeSpanObject.md b/src/Aks/Aks.Autorest/examples/New-AzAksTimeSpanObject.md new file mode 100644 index 000000000000..b760d4622ce9 --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/New-AzAksTimeSpanObject.md @@ -0,0 +1,16 @@ +### Example 1: Create Create an in-memory object for a time span +```powershell +$startDate = Get-Date -Year 2023 -Month 3 -Day 1 +$endDate = Get-Date -Year 2023 -Month 3 -Day 2 +New-AzAksTimeSpanObject -Start $startDate -End $endDate +``` + +```output +End Start +--- ----- +3/2/2023 1:53:53 PM 3/1/2023 1:53:45 PM +``` + +*New-AzAksTimeSpanObject* creates an in-memory object of type *TimeSpan*. This object represents a time span and will be used for parameter *NotAllowedTime* in cmdlet *New-AzAksMaintenanceConfiguration*. + + diff --git a/src/Aks/Aks.Autorest/examples/Remove-AzAksMaintenanceConfiguration.md b/src/Aks/Aks.Autorest/examples/Remove-AzAksMaintenanceConfiguration.md new file mode 100644 index 000000000000..a0ca45069184 --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Remove-AzAksMaintenanceConfiguration.md @@ -0,0 +1,12 @@ +### Example 1: Remove a maintenance configuration +```powershell +Remove-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName mycluster -ConfigName 'aks_maintenance_config' +``` + +### Example 2: Remove a maintenance configuration via identity +```powershell +$MaintenanceConfig = Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' +$MaintenanceConfig | Remove-AzAksMaintenanceConfiguration +``` + + diff --git a/src/Aks/Aks.Autorest/examples/Remove-AzAksSnapshot.md b/src/Aks/Aks.Autorest/examples/Remove-AzAksSnapshot.md new file mode 100644 index 000000000000..dfdedc0edbe3 --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Remove-AzAksSnapshot.md @@ -0,0 +1,12 @@ +### Example 1: Remove an AKS snapshot +```powershell +Remove-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +``` + +### Example 2: Remove an AKS snapshot via identity +```powershell +$Snapshot = Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +$Snapshot | Remove-AzAksSnapshot +``` + + diff --git a/src/Aks/Aks.Autorest/examples/Start-AzAksCluster.md b/src/Aks/Aks.Autorest/examples/Start-AzAksCluster.md index e6778e860225..1582d86cc44e 100644 --- a/src/Aks/Aks.Autorest/examples/Start-AzAksCluster.md +++ b/src/Aks/Aks.Autorest/examples/Start-AzAksCluster.md @@ -11,3 +11,5 @@ Get-AzAksCluster -ResourceGroupName group -Name myCluster | Start-AzAksCluster ``` Start Aks cluster with pipeline. + + diff --git a/src/Aks/Aks.Autorest/examples/Start-AzAksManagedClusterCommand.md b/src/Aks/Aks.Autorest/examples/Start-AzAksManagedClusterCommand.md new file mode 100644 index 000000000000..7e286c827011 --- /dev/null +++ b/src/Aks/Aks.Autorest/examples/Start-AzAksManagedClusterCommand.md @@ -0,0 +1,40 @@ +### Example 1: Run AKS command +```powershell +Start-AzAksManagedClusterCommand -ResourceGroupName mygroup -ResourceName mycluster -Command "kubectl get nodes" +``` + +```output +ExitCode : 0 +FinishedAt : 3/31/2023 8:52:17 AM +Id : 0a3991475d9744fcbfdc2595b40e517f +Log : NAME STATUS ROLES AGE VERSION + aks-default-40136599-vmss000000 Ready agent 46m v1.24.9 + aks-pool2-22198594-vmss000000 Ready agent 43m v1.24.9 + +ProvisioningState : Succeeded +Reason : +StartedAt : 3/31/2023 8:52:16 AM +``` + +AKS will create a pod to run the command. This is primarily useful for private clusters. + +### Example 2: Run AKS command via identity +```powershell +$cluster = Get-AzAksCluster -ResourceGroupName mygroup -Name mycluster +$cluster | Start-AzAksManagedClusterCommand -Command "kubectl get nodes" +``` + +```output +ExitCode : 0 +FinishedAt : 3/31/2023 8:54:17 AM +Id : 0a3991475d9744fcbfdc2595b40e517f +Log : NAME STATUS ROLES AGE VERSION + aks-default-40136599-vmss000000 Ready agent 46m v1.24.9 + aks-pool2-22198594-vmss000000 Ready agent 43m v1.24.9 + +ProvisioningState : Succeeded +Reason : +StartedAt : 3/31/2023 8:54:16 AM +``` + + diff --git a/src/Aks/Aks.Autorest/examples/Stop-AzAksCluster.md b/src/Aks/Aks.Autorest/examples/Stop-AzAksCluster.md index 8f3d8a15a855..04be72e4382f 100644 --- a/src/Aks/Aks.Autorest/examples/Stop-AzAksCluster.md +++ b/src/Aks/Aks.Autorest/examples/Stop-AzAksCluster.md @@ -12,3 +12,4 @@ Get-AzAksCluster -ResourceGroupName group -Name myCluster | Stop-AzAksCluster Stop Aks cluster with pipeline. + diff --git a/src/Aks/Aks.Autorest/exports/Get-AzAksMaintenanceConfiguration.ps1 b/src/Aks/Aks.Autorest/exports/Get-AzAksMaintenanceConfiguration.ps1 new file mode 100644 index 000000000000..3e82d0b3670d --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Get-AzAksMaintenanceConfiguration.ps1 @@ -0,0 +1,221 @@ + +# ---------------------------------------------------------------------------------- +# 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 the specified maintenance configuration of a managed cluster. +.Description +Gets the specified maintenance configuration of a managed cluster. +.Example +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.Api20230201.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmaintenanceconfiguration +#> +function Get-AzAksMaintenanceConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # 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. + # 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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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(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 + + 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-AzAksMaintenanceConfiguration_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_GetViaIdentity'; + List = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_List'; + } + if (('Get', 'List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterCommandResult.ps1 b/src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterCommandResult.ps1 new file mode 100644 index 000000000000..1445354a90a4 --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterCommandResult.ps1 @@ -0,0 +1,216 @@ + +# ---------------------------------------------------------------------------------- +# 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 the results of a command which has been run on the Managed Cluster. +.Description +Gets the results of a command which has been run on the Managed Cluster. +.Example +Get-AzAksManagedClusterCommandResult -ResourceGroupName mygroup -ResourceName mycluster -CommandId '706de66629b14267b4962cf015122c12' + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustercommandresult +#> +function Get-AzAksManagedClusterCommandResult { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # 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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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-AzAksManagedClusterCommandResult_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterCommandResult_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOSOption.ps1 b/src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOSOption.ps1 new file mode 100644 index 000000000000..b5b06aa129e6 --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOSOption.ps1 @@ -0,0 +1,203 @@ + +# ---------------------------------------------------------------------------------- +# 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 supported OS options in the specified subscription. +.Description +Gets supported OS options in the specified subscription. +.Example +Get-AzAksManagedClusterOSOption -Location eastus + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusterosoption +#> +function Get-AzAksManagedClusterOSOption { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +param( + [Parameter(ParameterSetName='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of Azure region. + ${Location}, + + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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()] + [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 + + 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-AzAksManagedClusterOSOption_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterOSOption_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.ps1 b/src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.ps1 new file mode 100644 index 000000000000..1facac0da04a --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.ps1 @@ -0,0 +1,181 @@ + +# ---------------------------------------------------------------------------------- +# 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 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 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 +$result = Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint -ResourceGroupName mygroup -ResourceName mycluster +$result | select Category,Endpoint + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusteroutboundnetworkdependencyendpoint +#> +function Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint])] +[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}, + + [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. + ${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 + + 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-AzAksManagedClusterOutboundNetworkDependencyEndpoint_List'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Get-AzAksNodePoolUpgradeProfile.ps1 b/src/Aks/Aks.Autorest/exports/Get-AzAksNodePoolUpgradeProfile.ps1 index 8fa21b5c81e8..d3c5934fc659 100644 --- a/src/Aks/Aks.Autorest/exports/Get-AzAksNodePoolUpgradeProfile.ps1 +++ b/src/Aks/Aks.Autorest/exports/Get-AzAksNodePoolUpgradeProfile.ps1 @@ -16,16 +16,16 @@ <# .Synopsis -Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. +Gets the upgrade profile for an agent pool. .Description -Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. +Gets the upgrade profile for an agent pool. .Example Get-AzAksNodePoolUpgradeProfile -ResourceGroupName group -ClusterName myCluster -AgentPoolName default .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile .Notes COMPLEX PARAMETER PROPERTIES @@ -33,18 +33,20 @@ To create the parameters described below, construct a hash table containing the 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 a supported Azure region. + [Location ]: The name of Azure region. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. + [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 ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.aks/get-azaksnodepoolupgradeprofile #> function Get-AzAksNodePoolUpgradeProfile { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -64,14 +66,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -86,7 +88,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -138,7 +141,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { diff --git a/src/Aks/Aks.Autorest/exports/Get-AzAksSnapshot.ps1 b/src/Aks/Aks.Autorest/exports/Get-AzAksSnapshot.ps1 new file mode 100644 index 000000000000..d3a09c8a950a --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Get-AzAksSnapshot.ps1 @@ -0,0 +1,217 @@ + +# ---------------------------------------------------------------------------------- +# 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 a snapshot. +.Description +Gets a snapshot. +.Example +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 +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot +.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azakssnapshot +#> +function Get-AzAksSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [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='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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(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 + + 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-AzAksSnapshot_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksSnapshot_GetViaIdentity'; + List = 'Az.Aks.private\Get-AzAksSnapshot_List'; + List1 = 'Az.Aks.private\Get-AzAksSnapshot_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Get-AzAksUpgradeProfile.ps1 b/src/Aks/Aks.Autorest/exports/Get-AzAksUpgradeProfile.ps1 index 746ee07c0677..aff8872dc0de 100644 --- a/src/Aks/Aks.Autorest/exports/Get-AzAksUpgradeProfile.ps1 +++ b/src/Aks/Aks.Autorest/exports/Get-AzAksUpgradeProfile.ps1 @@ -16,16 +16,16 @@ <# .Synopsis -Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. +Gets the upgrade profile of a managed cluster. .Description -Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. +Gets the upgrade profile of a managed cluster. .Example Get-AzAksUpgradeProfile -ResourceGroupName group -Name myCluster .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile .Notes COMPLEX PARAMETER PROPERTIES @@ -33,19 +33,21 @@ To create the parameters described below, construct a hash table containing the 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 a supported Azure region. + [Location ]: The name of Azure region. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. + [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 ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.aks/get-azaksupgradeprofile #> function Get-AzAksUpgradeProfile { [Alias('Get-AzAksClusterUpgradeProfile')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile])] [CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] @@ -59,14 +61,14 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] # The name of the resource group. + # The name is case insensitive. ${ResourceGroupName}, [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -81,7 +83,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -133,7 +136,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { diff --git a/src/Aks/Aks.Autorest/exports/Get-AzAksVersion.ps1 b/src/Aks/Aks.Autorest/exports/Get-AzAksVersion.ps1 index 2771443cebf5..4378357d8e47 100644 --- a/src/Aks/Aks.Autorest/exports/Get-AzAksVersion.ps1 +++ b/src/Aks/Aks.Autorest/exports/Get-AzAksVersion.ps1 @@ -104,7 +104,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { diff --git a/src/Aks/Aks.Autorest/exports/Install-AzAksCliTool.ps1 b/src/Aks/Aks.Autorest/exports/Install-AzAksCliTool.ps1 index d4ca3d81e72f..ef72095a16fe 100644 --- a/src/Aks/Aks.Autorest/exports/Install-AzAksCliTool.ps1 +++ b/src/Aks/Aks.Autorest/exports/Install-AzAksCliTool.ps1 @@ -106,7 +106,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { diff --git a/src/Aks/Aks.Autorest/exports/Invoke-AzAksAbortAgentPoolLatestOperation.ps1 b/src/Aks/Aks.Autorest/exports/Invoke-AzAksAbortAgentPoolLatestOperation.ps1 new file mode 100644 index 000000000000..41644cf4f1bd --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Invoke-AzAksAbortAgentPoolLatestOperation.ps1 @@ -0,0 +1,232 @@ + +# ---------------------------------------------------------------------------------- +# 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 +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 +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 +Invoke-AzAksAbortAgentPoolLatestOperation -ResourceGroupName mygroup -ResourceName mycluster -AgentPoolName 'pool1' + +.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortagentpoollatestoperation +#> +function Invoke-AzAksAbortAgentPoolLatestOperation { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Abort', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Abort', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the agent pool. + ${AgentPoolName}, + + [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='Abort', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AbortViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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 = @{ + Abort = 'Az.Aks.private\Invoke-AzAksAbortAgentPoolLatestOperation_Abort'; + AbortViaIdentity = 'Az.Aks.private\Invoke-AzAksAbortAgentPoolLatestOperation_AbortViaIdentity'; + } + if (('Abort') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Invoke-AzAksAbortManagedClusterLatestOperation.ps1 b/src/Aks/Aks.Autorest/exports/Invoke-AzAksAbortManagedClusterLatestOperation.ps1 new file mode 100644 index 000000000000..0cde2866a3e2 --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Invoke-AzAksAbortManagedClusterLatestOperation.ps1 @@ -0,0 +1,226 @@ + +# ---------------------------------------------------------------------------------- +# 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 +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 +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 +Invoke-AzAksAbortManagedClusterLatestOperation -ResourceGroupName mygroup -ResourceName mycluster + +.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortmanagedclusterlatestoperation +#> +function Invoke-AzAksAbortManagedClusterLatestOperation { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Abort', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [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='Abort', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AbortViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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 = @{ + Abort = 'Az.Aks.private\Invoke-AzAksAbortManagedClusterLatestOperation_Abort'; + AbortViaIdentity = 'Az.Aks.private\Invoke-AzAksAbortManagedClusterLatestOperation_AbortViaIdentity'; + } + if (('Abort') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.ps1 b/src/Aks/Aks.Autorest/exports/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.ps1 new file mode 100644 index 000000000000..b0f199b86282 --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.ps1 @@ -0,0 +1,222 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Rotates the service account signing keys of a managed cluster. +.Description +Rotates the service account signing keys of a managed cluster. +.Example +Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -ResourceGroupName mygroup -ResourceName mycluster + +.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksrotatemanagedclusterserviceaccountsigningkey +#> +function Invoke-AzAksRotateManagedClusterServiceAccountSigningKey { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Rotate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [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='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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RotateViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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 = @{ + Rotate = 'Az.Aks.private\Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_Rotate'; + RotateViaIdentity = 'Az.Aks.private\Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity'; + } + if (('Rotate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/New-AzAksMaintenanceConfiguration.ps1 b/src/Aks/Aks.Autorest/exports/New-AzAksMaintenanceConfiguration.ps1 new file mode 100644 index 000000000000..4c3f1366f3e9 --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/New-AzAksMaintenanceConfiguration.ps1 @@ -0,0 +1,214 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Creates or updates a maintenance configuration in the specified managed cluster. +.Description +Creates or updates 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 +$MaintenanceConfig = New-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -TimeInWeek $TimeInWeek -NotAllowedTime $TimeSpan + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/new-azaksmaintenanceconfiguration +#> +function New-AzAksMaintenanceConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +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}, + + [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. + ${SubscriptionId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[]] + # Time slots on which upgrade is not allowed. + # To construct, see NOTES section for NOTALLOWEDTIME properties and create a hash table. + ${NotAllowedTime}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[]] + # If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + # To construct, see NOTES section for TIMEINWEEK properties and create a hash table. + ${TimeInWeek}, + + [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 + + 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-AzAksMaintenanceConfiguration_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/New-AzAksSnapshot.ps1 b/src/Aks/Aks.Autorest/exports/New-AzAksSnapshot.ps1 new file mode 100644 index 000000000000..d6e14e471c54 --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/New-AzAksSnapshot.ps1 @@ -0,0 +1,206 @@ + +# ---------------------------------------------------------------------------------- +# 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 +Creates or updates a snapshot. +.Description +Creates or updates 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 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot +.Link +https://learn.microsoft.com/powershell/module/az.aks/new-azakssnapshot +#> +function New-AzAksSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +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}, + + [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. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [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()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType])] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType] + # The type of a snapshot. + # The default is NodePool. + ${SnapshotType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [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 + + 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'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/New-AzAksTimeInWeekObject.ps1 b/src/Aks/Aks.Autorest/exports/New-AzAksTimeInWeekObject.ps1 new file mode 100644 index 000000000000..36e540e4ebb4 --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/New-AzAksTimeInWeekObject.ps1 @@ -0,0 +1,122 @@ + +# ---------------------------------------------------------------------------------- +# 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 an in-memory object for TimeInWeek. +.Description +Create an in-memory object for TimeInWeek. +.Example +New-AzAksTimeInWeekObject -Day 'Sunday' -HourSlot 1,2 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek +.Link +https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeInWeekObject +#> +function New-AzAksTimeInWeekObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay])] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay] + # The day of the week. + ${Day}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32[]] + # 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} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + 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 = @{ + __AllParameterSets = 'Az.Aks.custom\New-AzAksTimeInWeekObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/New-AzAksTimeSpanObject.ps1 b/src/Aks/Aks.Autorest/exports/New-AzAksTimeSpanObject.ps1 new file mode 100644 index 000000000000..e39276e8e3aa --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/New-AzAksTimeSpanObject.ps1 @@ -0,0 +1,121 @@ + +# ---------------------------------------------------------------------------------- +# 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 an in-memory object for TimeSpan. +.Description +Create an in-memory object for TimeSpan. +.Example +$startDate = Get-Date -Year 2023 -Month 3 -Day 1 +$endDate = Get-Date -Year 2023 -Month 3 -Day 2 +New-AzAksTimeSpanObject -Start $startDate -End $endDate + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan +.Link +https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeSpanObject +#> +function New-AzAksTimeSpanObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.DateTime] + # The end of a time span. + ${End}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.DateTime] + # The start of a time span. + ${Start} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + 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 = @{ + __AllParameterSets = 'Az.Aks.custom\New-AzAksTimeSpanObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/ProxyCmdletDefinitions.ps1 b/src/Aks/Aks.Autorest/exports/ProxyCmdletDefinitions.ps1 index b4109848f8ae..3c677b3ac987 100644 --- a/src/Aks/Aks.Autorest/exports/ProxyCmdletDefinitions.ps1 +++ b/src/Aks/Aks.Autorest/exports/ProxyCmdletDefinitions.ps1 @@ -16,16 +16,23 @@ <# .Synopsis -Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. +Gets the specified maintenance configuration of a managed cluster. .Description -Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. +Gets the specified maintenance configuration of a managed cluster. .Example -Get-AzAksNodePoolUpgradeProfile -ResourceGroupName group -ClusterName myCluster -AgentPoolName default +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.Api20200901.IAgentPoolUpgradeProfile +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration .Notes COMPLEX PARAMETER PROPERTIES @@ -33,45 +40,49 @@ To create the parameters described below, construct a hash table containing the 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 a supported Azure region. + [Location ]: The name of Azure region. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. + [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 ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionId ]: The ID of the target subscription. .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azaksnodepoolupgradeprofile +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmaintenanceconfiguration #> -function Get-AzAksNodePoolUpgradeProfile { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile])] -[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] +function Get-AzAksMaintenanceConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the managed cluster resource. - ${ClusterName}, + # The name of the maintenance configuration. + ${ConfigName}, [Parameter(ParameterSetName='Get', Mandatory)] - [Alias('AgentPoolName')] + [Parameter(ParameterSetName='List', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the agent pool. - ${NodePoolName}, + # 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 resource group. - ${ResourceGroupName}, + # 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[]] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -86,7 +97,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -138,7 +150,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -155,10 +167,11 @@ begin { } $mapping = @{ - Get = 'Az.Aks.private\Get-AzAksNodePoolUpgradeProfile_Get'; - GetViaIdentity = 'Az.Aks.private\Get-AzAksNodePoolUpgradeProfile_GetViaIdentity'; + Get = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksMaintenanceConfiguration_GetViaIdentity'; + 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')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -209,16 +222,16 @@ end { <# .Synopsis -Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. +Gets the results of a command which has been run on the Managed Cluster. .Description -Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. +Gets the results of a command which has been run on the Managed Cluster. .Example -Get-AzAksUpgradeProfile -ResourceGroupName group -Name myCluster +Get-AzAksManagedClusterCommandResult -ResourceGroupName mygroup -ResourceName mycluster -CommandId '706de66629b14267b4962cf015122c12' .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult .Notes COMPLEX PARAMETER PROPERTIES @@ -226,40 +239,46 @@ To create the parameters described below, construct a hash table containing the 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 a supported Azure region. + [Location ]: The name of Azure region. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. + [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 ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionId ]: The ID of the target subscription. .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azaksupgradeprofile +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustercommandresult #> -function Get-AzAksUpgradeProfile { -[Alias('Get-AzAksClusterUpgradeProfile')] -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile])] +function Get-AzAksManagedClusterCommandResult { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult])] [CmdletBinding(DefaultParameterSetName='Get', 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}, + # 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[]] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] @@ -274,7 +293,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -297,6 +317,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] @@ -326,7 +352,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -343,8 +369,8 @@ begin { } $mapping = @{ - Get = 'Az.Aks.private\Get-AzAksUpgradeProfile_Get'; - GetViaIdentity = 'Az.Aks.private\Get-AzAksUpgradeProfile_GetViaIdentity'; + Get = 'Az.Aks.private\Get-AzAksManagedClusterCommandResult_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterCommandResult_GetViaIdentity'; } if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id @@ -397,18 +423,16 @@ end { <# .Synopsis -Starts a Stopped Managed Cluster +Gets supported OS options in the specified subscription. .Description -Starts a Stopped Managed Cluster -.Example -Start-AzAksCluster -ResourceGroupName group -Name myCluster +Gets supported OS options in the specified subscription. .Example -Get-AzAksCluster -ResourceGroupName group -Name myCluster | Start-AzAksCluster +Get-AzAksManagedClusterOSOption -Location eastus .Inputs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -System.Boolean +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile .Notes COMPLEX PARAMETER PROPERTIES @@ -416,62 +440,57 @@ To create the parameters described below, construct a hash table containing the 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 a supported Azure region. + [Location ]: The name of Azure region. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. + [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 ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionId ]: The ID of the target subscription. .Link -https://learn.microsoft.com/powershell/module/az.aks/start-azakscluster +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusterosoption #> -function Start-AzAksCluster { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Start', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzAksManagedClusterOSOption { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] 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='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of the resource group. - ${ResourceGroupName}, + # The name of Azure region. + ${Location}, - [Parameter(ParameterSetName='Start')] + [Parameter(ParameterSetName='Get')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] - [System.String] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. + [System.String[]] + # The ID of the target subscription. ${SubscriptionId}, - [Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] # Identity Parameter # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. ${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()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # 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] @@ -492,18 +511,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] @@ -533,7 +540,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -550,10 +557,10 @@ begin { } $mapping = @{ - Start = 'Az.Aks.private\Start-AzAksCluster_Start'; - StartViaIdentity = 'Az.Aks.private\Start-AzAksCluster_StartViaIdentity'; + Get = 'Az.Aks.private\Get-AzAksManagedClusterOSOption_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksManagedClusterOSOption_GetViaIdentity'; } - if (('Start') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -604,81 +611,53 @@ end { <# .Synopsis -Stops a Running 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 -Stops a Running Managed Cluster -.Example -Stop-AzAksCluster -ResourceGroupName group -Name myCluster +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-AzAksCluster -ResourceGroupName group -Name myCluster | Stop-AzAksCluster +$result = Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint -ResourceGroupName mygroup -ResourceName mycluster +$result | select Category,Endpoint -.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. - [Id ]: Resource identity path - [Location ]: The name of a supported Azure region. - [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. - [ResourceName ]: The name of the managed cluster resource. - [RoleName ]: The name of the role for managed cluster accessProfile resource. - [SubscriptionId ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint .Link -https://learn.microsoft.com/powershell/module/az.aks/stop-azakscluster +https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusteroutboundnetworkdependencyendpoint #> -function Stop-AzAksCluster { -[OutputType([System.Boolean])] -[CmdletBinding(DefaultParameterSetName='Stop', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +function Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] 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(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(Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. - ${SubscriptionId}, + # The name of the managed cluster resource. + ${ResourceName}, - [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)] + [Parameter()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] - # Identity Parameter - # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. - ${InputObject}, + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] + [System.String[]] + # The ID of the target subscription. + ${SubscriptionId}, [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # 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] @@ -699,18 +678,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] @@ -740,7 +707,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -757,10 +724,9 @@ begin { } $mapping = @{ - Stop = 'Az.Aks.private\Stop-AzAksCluster_Stop'; - StopViaIdentity = 'Az.Aks.private\Stop-AzAksCluster_StopViaIdentity'; + List = 'Az.Aks.private\Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint_List'; } - if (('Stop') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -811,43 +777,80 @@ end { <# .Synopsis -List available version for creating managed Kubernetes cluster. -The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. +Gets the upgrade profile for an agent pool. .Description -List available version for creating managed Kubernetes cluster. -The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. +Gets the upgrade profile for an agent pool. .Example -Get-AzAksVersion -location eastus +Get-AzAksNodePoolUpgradeProfile -ResourceGroupName group -ClusterName myCluster -AgentPoolName default +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20190801.IOrchestratorVersionProfileListResult +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile +.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. .Link -https://learn.microsoft.com/powershell/module/az.aks/get-azaksversion +https://learn.microsoft.com/powershell/module/az.aks/get-azaksnodepoolupgradeprofile #> -function Get-AzAksVersion { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20190801.IOrchestratorVersionProfileListResult])] -[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +function Get-AzAksNodePoolUpgradeProfile { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile])] +[CmdletBinding(DefaultParameterSetName='Get', PositionalBinding=$false)] param( - [Parameter(Mandatory)] + [Parameter(ParameterSetName='Get', Mandatory)] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [System.String] - # The name of a supported Azure region. - ${Location}, + # The name of the managed cluster resource. + ${ClusterName}, - [Parameter()] + [Parameter(ParameterSetName='Get', Mandatory)] + [Alias('AgentPoolName')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the agent pool. + ${NodePoolName}, + + [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')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. + # The ID of the target subscription. ${SubscriptionId}, + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + [Parameter()] [Alias('AzureRMContext', 'AzureCredential')] [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -899,7 +902,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -916,9 +919,10 @@ begin { } $mapping = @{ - List = 'Az.Aks.custom\Get-AzAksVersion'; + Get = 'Az.Aks.private\Get-AzAksNodePoolUpgradeProfile_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksNodePoolUpgradeProfile_GetViaIdentity'; } - if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id } $cmdInfo = Get-Command -Name $mapping[$parameterSet] @@ -969,20 +973,2650 @@ end { <# .Synopsis -Download and install kubectl and kubelogin. +Gets a snapshot. .Description -Download and install kubectl and kubelogin. +Gets a snapshot. .Example -Install-AzAksCliTool +Get-AzAksSnapshot .Example -Install-AzAksCliTool -KubectlInstallVersion "v1.25.0" -KubectlInstallDestination "~/bin/" -KubeloginInstallVersion "v0.0.20" -KubeloginInstallDestination "~/bin" +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.Api20230201.ISnapshot +.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. .Link -https://learn.microsoft.com/powershell/module/az.aks/install-azaksclitool +https://learn.microsoft.com/powershell/module/az.aks/get-azakssnapshot #> -function Install-AzAksCliTool { +function Get-AzAksSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [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='Get', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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(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 + + 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-AzAksSnapshot_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksSnapshot_GetViaIdentity'; + List = 'Az.Aks.private\Get-AzAksSnapshot_List'; + List1 = 'Az.Aks.private\Get-AzAksSnapshot_List1'; + } + if (('Get', 'List', 'List1') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 +Gets the upgrade profile of a managed cluster. +.Description +Gets the upgrade profile of a managed cluster. +.Example +Get-AzAksUpgradeProfile -ResourceGroupName group -Name myCluster + +.Inputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azaksupgradeprofile +#> +function Get-AzAksUpgradeProfile { +[Alias('Get-AzAksClusterUpgradeProfile')] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile])] +[CmdletBinding(DefaultParameterSetName='Get', 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)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the resource group. + # The name is case insensitive. + ${ResourceGroupName}, + + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='GetViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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(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 + + 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-AzAksUpgradeProfile_Get'; + GetViaIdentity = 'Az.Aks.private\Get-AzAksUpgradeProfile_GetViaIdentity'; + } + if (('Get') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 +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 +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 +Invoke-AzAksAbortAgentPoolLatestOperation -ResourceGroupName mygroup -ResourceName mycluster -AgentPoolName 'pool1' + +.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortagentpoollatestoperation +#> +function Invoke-AzAksAbortAgentPoolLatestOperation { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Abort', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='Abort', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the agent pool. + ${AgentPoolName}, + + [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='Abort', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AbortViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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 = @{ + Abort = 'Az.Aks.private\Invoke-AzAksAbortAgentPoolLatestOperation_Abort'; + AbortViaIdentity = 'Az.Aks.private\Invoke-AzAksAbortAgentPoolLatestOperation_AbortViaIdentity'; + } + if (('Abort') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 +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 +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 +Invoke-AzAksAbortManagedClusterLatestOperation -ResourceGroupName mygroup -ResourceName mycluster + +.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortmanagedclusterlatestoperation +#> +function Invoke-AzAksAbortManagedClusterLatestOperation { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Abort', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [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='Abort', Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='AbortViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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 = @{ + Abort = 'Az.Aks.private\Invoke-AzAksAbortManagedClusterLatestOperation_Abort'; + AbortViaIdentity = 'Az.Aks.private\Invoke-AzAksAbortManagedClusterLatestOperation_AbortViaIdentity'; + } + if (('Abort') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 +Rotates the service account signing keys of a managed cluster. +.Description +Rotates the service account signing keys of a managed cluster. +.Example +Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -ResourceGroupName mygroup -ResourceName mycluster + +.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksrotatemanagedclusterserviceaccountsigningkey +#> +function Invoke-AzAksRotateManagedClusterServiceAccountSigningKey { +[OutputType([System.Boolean])] +[CmdletBinding(DefaultParameterSetName='Rotate', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [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='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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RotateViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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 = @{ + Rotate = 'Az.Aks.private\Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_Rotate'; + RotateViaIdentity = 'Az.Aks.private\Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity'; + } + if (('Rotate') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 +Creates or updates a maintenance configuration in the specified managed cluster. +.Description +Creates or updates 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 +$MaintenanceConfig = New-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' -TimeInWeek $TimeInWeek -NotAllowedTime $TimeSpan + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/new-azaksmaintenanceconfiguration +#> +function New-AzAksMaintenanceConfiguration { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +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}, + + [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. + ${SubscriptionId}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[]] + # Time slots on which upgrade is not allowed. + # To construct, see NOTES section for NOTALLOWEDTIME properties and create a hash table. + ${NotAllowedTime}, + + [Parameter()] + [AllowEmptyCollection()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[]] + # If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. + # To construct, see NOTES section for TIMEINWEEK properties and create a hash table. + ${TimeInWeek}, + + [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 + + 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-AzAksMaintenanceConfiguration_CreateExpanded'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 +Creates or updates a snapshot. +.Description +Creates or updates 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 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot +.Link +https://learn.microsoft.com/powershell/module/az.aks/new-azakssnapshot +#> +function New-AzAksSnapshot { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot])] +[CmdletBinding(DefaultParameterSetName='CreateExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +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}, + + [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. + ${SubscriptionId}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The geo-location where the resource lives + ${Location}, + + [Parameter()] + [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()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType])] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType] + # The type of a snapshot. + # The default is NodePool. + ${SnapshotType}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info(PossibleTypes=([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags]))] + [System.Collections.Hashtable] + # Resource tags. + ${Tag}, + + [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 + + 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'; + } + if (('CreateExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 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. +.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)] + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 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. +.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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 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. +.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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 create a pod to run the command. +This is primarily useful for private clusters. +For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). +.Description +AKS will create a pod to run the command. +This is primarily useful for private clusters. +For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). +.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.Api20230201.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 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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/start-azaksmanagedclustercommand +#> +function Start-AzAksManagedClusterCommand { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult])] +[CmdletBinding(DefaultParameterSetName='RunExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='RunExpanded', 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)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='RunExpanded')] + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RunViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The command to run. + ${Command}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # AuthToken issued for AKS AAD Server App. + ${ClusterToken}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # A base64 encoded zip file containing the files required by the command. + ${Context}, + + [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 + + 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'; + } + if (('RunExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 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. +.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)] + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 +List available version for creating managed Kubernetes cluster. +The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. +.Description +List available version for creating managed Kubernetes cluster. +The operation returns properties of each orchestrator including version, available upgrades and whether that version or upgrades are in preview. +.Example +Get-AzAksVersion -location eastus + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20190801.IOrchestratorVersionProfileListResult +.Link +https://learn.microsoft.com/powershell/module/az.aks/get-azaksversion +#> +function Get-AzAksVersion { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20190801.IOrchestratorVersionProfileListResult])] +[CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] +param( + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of a supported 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[]] + # Subscription credentials which uniquely identify Microsoft Azure subscription. + # The subscription ID forms part of the URI for every service call. + ${SubscriptionId}, + + [Parameter()] + [Alias('AzureRMContext', 'AzureCredential')] + [ValidateNotNull()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] + [System.Management.Automation.PSObject] + # The credentials, account, tenant, and subscription used for communication with Azure. + ${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 + + 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.custom\Get-AzAksVersion'; + } + if (('List') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 +Download and install kubectl and kubelogin. +.Description +Download and install kubectl and kubelogin. +.Example +Install-AzAksCliTool +.Example +Install-AzAksCliTool -KubectlInstallVersion "v1.25.0" -KubectlInstallDestination "~/bin/" -KubeloginInstallVersion "v0.0.20" -KubeloginInstallDestination "~/bin" + +.Outputs +System.Boolean +.Link +https://learn.microsoft.com/powershell/module/az.aks/install-azaksclitool +#> +function Install-AzAksCliTool { [OutputType([System.Boolean])] [CmdletBinding(PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] param( @@ -1059,7 +3693,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { @@ -1123,3 +3757,216 @@ end { } } } + +<# +.Synopsis +Create an in-memory object for TimeInWeek. +.Description +Create an in-memory object for TimeInWeek. +.Example +New-AzAksTimeInWeekObject -Day 'Sunday' -HourSlot 1,2 + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek +.Link +https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeInWeekObject +#> +function New-AzAksTimeInWeekObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [ArgumentCompleter([Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay])] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay] + # The day of the week. + ${Day}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.Int32[]] + # 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} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + 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 = @{ + __AllParameterSets = 'Az.Aks.custom\New-AzAksTimeInWeekObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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 an in-memory object for TimeSpan. +.Description +Create an in-memory object for TimeSpan. +.Example +$startDate = Get-Date -Year 2023 -Month 3 -Day 1 +$endDate = Get-Date -Year 2023 -Month 3 -Day 2 +New-AzAksTimeSpanObject -Start $startDate -End $endDate + +.Outputs +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan +.Link +https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeSpanObject +#> +function New-AzAksTimeSpanObject { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan])] +[CmdletBinding(PositionalBinding=$false)] +param( + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.DateTime] + # The end of a time span. + ${End}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.DateTime] + # The start of a time span. + ${Start} +) + +begin { + try { + $outBuffer = $null + if ($PSBoundParameters.TryGetValue('OutBuffer', [ref]$outBuffer)) { + $PSBoundParameters['OutBuffer'] = 1 + } + $parameterSet = $PSCmdlet.ParameterSetName + + 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 = @{ + __AllParameterSets = 'Az.Aks.custom\New-AzAksTimeSpanObject'; + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Remove-AzAksMaintenanceConfiguration.ps1 b/src/Aks/Aks.Autorest/exports/Remove-AzAksMaintenanceConfiguration.ps1 new file mode 100644 index 000000000000..c9f01e87890c --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Remove-AzAksMaintenanceConfiguration.ps1 @@ -0,0 +1,219 @@ + +# ---------------------------------------------------------------------------------- +# 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 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 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. +.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)] + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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'; + } + if (('Delete') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Remove-AzAksSnapshot.ps1 b/src/Aks/Aks.Autorest/exports/Remove-AzAksSnapshot.ps1 new file mode 100644 index 000000000000..bd2fa40c52b4 --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Remove-AzAksSnapshot.ps1 @@ -0,0 +1,213 @@ + +# ---------------------------------------------------------------------------------- +# 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 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 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. +.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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='DeleteViaIdentity', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${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 + + 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')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Start-AzAksCluster.ps1 b/src/Aks/Aks.Autorest/exports/Start-AzAksCluster.ps1 index c5e4632329db..977125cb31c1 100644 --- a/src/Aks/Aks.Autorest/exports/Start-AzAksCluster.ps1 +++ b/src/Aks/Aks.Autorest/exports/Start-AzAksCluster.ps1 @@ -16,9 +16,9 @@ <# .Synopsis -Starts a Stopped Managed Cluster +See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. .Description -Starts a Stopped Managed Cluster +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 @@ -35,13 +35,15 @@ To create the parameters described below, construct a hash table containing the 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 a supported Azure region. + [Location ]: The name of Azure region. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. + [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 ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.aks/start-azakscluster #> @@ -60,14 +62,14 @@ param( [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] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='StartViaIdentity', Mandatory, ValueFromPipeline)] @@ -82,7 +84,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -152,7 +155,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { diff --git a/src/Aks/Aks.Autorest/exports/Start-AzAksManagedClusterCommand.ps1 b/src/Aks/Aks.Autorest/exports/Start-AzAksManagedClusterCommand.ps1 new file mode 100644 index 000000000000..5b92c96fb566 --- /dev/null +++ b/src/Aks/Aks.Autorest/exports/Start-AzAksManagedClusterCommand.ps1 @@ -0,0 +1,241 @@ + +# ---------------------------------------------------------------------------------- +# 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 +AKS will create a pod to run the command. +This is primarily useful for private clusters. +For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). +.Description +AKS will create a pod to run the command. +This is primarily useful for private clusters. +For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). +.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.Api20230201.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 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. +.Link +https://learn.microsoft.com/powershell/module/az.aks/start-azaksmanagedclustercommand +#> +function Start-AzAksManagedClusterCommand { +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult])] +[CmdletBinding(DefaultParameterSetName='RunExpanded', PositionalBinding=$false, SupportsShouldProcess, ConfirmImpact='Medium')] +param( + [Parameter(ParameterSetName='RunExpanded', 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)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [System.String] + # The name of the managed cluster resource. + ${ResourceName}, + + [Parameter(ParameterSetName='RunExpanded')] + [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. + ${SubscriptionId}, + + [Parameter(ParameterSetName='RunViaIdentityExpanded', Mandatory, ValueFromPipeline)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity] + # Identity Parameter + # To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + ${InputObject}, + + [Parameter(Mandatory)] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # The command to run. + ${Command}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # AuthToken issued for AKS AAD Server App. + ${ClusterToken}, + + [Parameter()] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Body')] + [System.String] + # A base64 encoded zip file containing the files required by the command. + ${Context}, + + [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 + + 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'; + } + if (('RunExpanded') -contains $parameterSet -and -not $PSBoundParameters.ContainsKey('SubscriptionId')) { + $PSBoundParameters['SubscriptionId'] = (Get-AzContext).Subscription.Id + } + $cmdInfo = Get-Command -Name $mapping[$parameterSet] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.MessageAttributeHelper]::ProcessCustomAttributesAtRuntime($cmdInfo, $MyInvocation, $parameterSet, $PSCmdlet) + $wrappedCmd = $ExecutionContext.InvokeCommand.GetCommand(($mapping[$parameterSet]), [System.Management.Automation.CommandTypes]::Cmdlet) + $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/src/Aks/Aks.Autorest/exports/Stop-AzAksCluster.ps1 b/src/Aks/Aks.Autorest/exports/Stop-AzAksCluster.ps1 index 2b68b81994a3..31c52c1e91b7 100644 --- a/src/Aks/Aks.Autorest/exports/Stop-AzAksCluster.ps1 +++ b/src/Aks/Aks.Autorest/exports/Stop-AzAksCluster.ps1 @@ -16,9 +16,15 @@ <# .Synopsis -Stops a Running Managed Cluster +This can only be performed on Azure Virtual Machine Scale set backed clusters. +Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. +A cluster does not accrue charges while it is stopped. +See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. .Description -Stops a Running Managed Cluster +This can only be performed on Azure Virtual Machine Scale set backed clusters. +Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. +A cluster does not accrue charges while it is stopped. +See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. .Example Stop-AzAksCluster -ResourceGroupName group -Name myCluster .Example @@ -35,13 +41,15 @@ To create the parameters described below, construct a hash table containing the 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 a supported Azure region. + [Location ]: The name of Azure region. [PrivateEndpointConnectionName ]: The name of the private endpoint connection. - [ResourceGroupName ]: The name of the resource group. + [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 ]: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + [SubscriptionId ]: The ID of the target subscription. .Link https://learn.microsoft.com/powershell/module/az.aks/stop-azakscluster #> @@ -60,14 +68,14 @@ param( [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] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. + # The ID of the target subscription. ${SubscriptionId}, [Parameter(ParameterSetName='StopViaIdentity', Mandatory, ValueFromPipeline)] @@ -82,7 +90,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter()] @@ -152,7 +161,7 @@ begin { $parameterSet = $PSCmdlet.ParameterSetName if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) { - [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() + [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() } $preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId if ($preTelemetryId -eq '') { diff --git a/src/Aks/Aks.Autorest/generate-info.json b/src/Aks/Aks.Autorest/generate-info.json index 18d1af71dfc3..ab42b8c9afc9 100644 --- a/src/Aks/Aks.Autorest/generate-info.json +++ b/src/Aks/Aks.Autorest/generate-info.json @@ -1,8 +1,8 @@ { - "autorest_powershell": "3.0.494", - "swagger_commit": "758051818767b2519bfceafeaa0213d4b7948ebd", + "node": "v14.15.5", "autorest_modelerfour": "4.15.414", - "autorest_core": "3.9.2", "autorest": "`-- (empty)", - "node": "v16.16.0" + "autorest_powershell": "3.0.504", + "swagger_commit": "97c5c70de4e3b2e97cf85b707f5f6b5832c5a082", + "autorest_core": "3.9.4" } diff --git a/src/Aks/Aks.Autorest/generated/api/Aks.cs b/src/Aks/Aks.Autorest/generated/api/Aks.cs index 3b5ccd2f2c61..b6846cc97819 100644 --- a/src/Aks/Aks.Autorest/generated/api/Aks.cs +++ b/src/Aks/Aks.Autorest/generated/api/Aks.cs @@ -14,13 +14,302 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks public partial class Aks { + /// + /// Aborts the currently running operation on the agent pool. The Agent Pool will be moved to a Canceling state and eventually + /// to a Canceled state when cancellation finishes. If the operation completes before cancellation can take place, a 409 error + /// code is returned. + /// + /// The ID of the target subscription. + /// The 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 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 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) + { + 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) + + "/agentPools/" + + global::System.Uri.EscapeDataString(agentPoolName) + + "/abort" + + "?" + + "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.AgentPoolsAbortLatestOperation_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// + /// 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. + /// + /// + /// 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 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) + { + 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/(?[^/]+)/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}/abort'"); + } + + // 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 + + "/abort" + + "?" + + "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.AgentPoolsAbortLatestOperation_Call(request,onNoContent,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 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 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) + { + 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; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // 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; + } + 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.Api20230201.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. + /// + /// 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. + /// 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 AgentPoolsAbortLatestOperation_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.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}$"); + } + } + /// Creates or updates an agent pool in the specified managed cluster. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. - /// Parameters supplied to the Create or Update an agent pool operation. + /// 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 /// elsewhere). @@ -29,9 +318,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.Api20200901.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) + public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, string agentPoolName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -68,7 +357,7 @@ public partial class Aks /// Creates or updates an agent pool in the specified managed cluster. /// - /// Parameters supplied to the Create or Update an agent pool operation. + /// 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 /// elsewhere). @@ -77,9 +366,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.Api20200901.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) + public async global::System.Threading.Tasks.Task AgentPoolsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -137,7 +426,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 ) { @@ -254,13 +543,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.Api20200901.AgentPool.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.Api20230201.AgentPool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); 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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -279,23 +568,24 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you will get /// validation events back. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. - /// Parameters supplied to the Create or Update an agent pool operation. + /// 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.Api20200901.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, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.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); @@ -306,10 +596,9 @@ public partial class Aks } } - /// Deletes the agent pool in the specified managed cluster. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// Deletes an agent pool 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 agent pool. /// a delegate that is called when the remote service returns 204 (NoContent). @@ -320,9 +609,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, 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, 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -353,7 +642,7 @@ public partial class Aks } } - /// Deletes the agent pool in the specified managed cluster. + /// Deletes an agent pool 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 default (any response code not handled @@ -363,9 +652,9 @@ public partial class Aks /// /// 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, 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, 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -419,7 +708,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, 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, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -543,7 +832,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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -562,9 +851,8 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. /// an instance that will receive events. @@ -576,8 +864,10 @@ public partial class Aks 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); @@ -586,10 +876,9 @@ public partial class Aks } } - /// Gets the details of the agent pool by managed cluster and resource group. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. /// a delegate that is called when the remote service returns 200 (OK). @@ -600,9 +889,9 @@ 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 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -633,20 +922,24 @@ public partial class Aks } } - /// Gets a list of supported versions for the specified agent pool. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// + /// 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. /// 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, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) + 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -672,21 +965,26 @@ 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.AgentPoolsGetAvailableAgentPoolVersions_Call(request,onOk,eventListener,sender); + await this.AgentPoolsGetAvailableAgentPoolVersions_Call(request,onOk,onDefault,eventListener,sender); } } - /// Gets a list of supported versions for the specified agent pool. + /// + /// See [supported Kubernetes versions](https://docs.microsoft.com/azure/aks/supported-kubernetes-versions) for more details + /// about the version lifecycle. + /// /// /// 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 AgentPoolsGetAvailableAgentPoolVersionsViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -724,7 +1022,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.AgentPoolsGetAvailableAgentPoolVersions_Call(request,onOk,eventListener,sender); + await this.AgentPoolsGetAvailableAgentPoolVersions_Call(request,onOk,onDefault,eventListener,sender); } } @@ -733,12 +1031,14 @@ public partial class Aks /// /// 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 AgentPoolsGetAvailableAgentPoolVersions_Call(global::System.Net.Http.HttpRequestMessage request, global::System.Func, global::System.Threading.Tasks.Task> onOk, 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 ) { @@ -756,12 +1056,14 @@ 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.Api20200901.AgentPoolAvailableVersions.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.Api20230201.AgentPoolAvailableVersions.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } default: { - throw new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.UndeclaredResponseException(_response); + 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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + break; } } } @@ -779,9 +1081,8 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but /// you will get validation events back. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. /// @@ -792,8 +1093,10 @@ public partial class Aks 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); @@ -801,12 +1104,9 @@ public partial class Aks } } - /// - /// Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// Gets the upgrade profile for an 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. /// a delegate that is called when the remote service returns 200 (OK). @@ -817,9 +1117,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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -851,9 +1151,7 @@ public partial class Aks } } - /// - /// Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. - /// + /// Gets the upgrade profile for an 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 @@ -863,9 +1161,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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -920,7 +1218,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 ) { @@ -938,13 +1236,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.Api20200901.AgentPoolUpgradeProfile.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.Api20230201.AgentPoolUpgradeProfile.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -963,9 +1261,8 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you will /// get validation events back. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. /// an instance that will receive events. @@ -977,17 +1274,22 @@ public partial class Aks 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(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 the details of the agent pool by managed cluster and resource group. + /// Gets the specified managed cluster 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 @@ -997,9 +1299,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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1053,7 +1355,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 ) { @@ -1071,13 +1373,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.Api20200901.AgentPool.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.Api20230201.AgentPool.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) .ReadHeaders(_response.Headers))); 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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1096,9 +1398,8 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. /// an instance that will receive events. @@ -1110,22 +1411,24 @@ public partial class Aks 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(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 agent pools in the specified managed cluster. The operation returns properties of each agent pool. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// Gets a list of agent pools 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. /// 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 @@ -1135,9 +1438,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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1167,9 +1470,7 @@ public partial class Aks } } - /// - /// Gets a list of agent pools in the specified managed cluster. The operation returns properties of each agent pool. - /// + /// Gets a list of agent pools in the specified 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 @@ -1179,9 +1480,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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1233,7 +1534,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 ) { @@ -1251,13 +1552,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.Api20200901.AgentPoolListResult.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.Api20230201.AgentPoolListResult.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1276,9 +1577,8 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you will get validation /// events back. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. /// @@ -1289,8 +1589,10 @@ public partial class Aks 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); @@ -1298,10 +1600,12 @@ public partial class Aks } } - /// Upgrade node image version of an agent pool to the latest. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides + /// one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade + /// + /// The ID of the target subscription. + /// The 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). @@ -1312,9 +1616,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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1346,7 +1650,10 @@ public partial class Aks } } - /// Upgrade node image version of an agent pool to the latest. + /// + /// Upgrading the node image version of an agent pool applies the newest OS and runtime updates to the nodes. AKS provides + /// one new image per week with the latest updates. For more details on node image versions, see: https://docs.microsoft.com/azure/aks/node-image-upgrade + /// /// /// 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 @@ -1356,9 +1663,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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1413,7 +1720,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 ) { @@ -1426,7 +1733,7 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default + // declared final-state-via: location var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); @@ -1510,19 +1817,16 @@ public partial class Aks 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); + // 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; } var _contentType = _response.Content.Headers.ContentType?.MediaType; @@ -1537,7 +1841,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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -1556,9 +1860,8 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you /// will get validation events back. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. /// an instance that will receive events. @@ -1570,13 +1873,18 @@ public partial class Aks 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(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}$"); } } @@ -1584,8 +1892,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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The ID of the target subscription. /// 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). @@ -1730,8 +2037,7 @@ public partial class Aks /// Validation method for method. Call this like the actual call, but you /// will get validation events back. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// The ID of the target subscription. /// 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. @@ -1743,19 +2049,20 @@ public partial class Aks using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); + await eventListener.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); await eventListener.AssertNotNull(nameof(location),location); await eventListener.AssertNotNull(nameof(resourceType),resourceType); } } /// - /// Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + /// Creates or updates a maintenance configuration in the specified managed cluster. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 Create or Update a Managed Cluster operation. + /// 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 default (any response code not handled /// elsewhere). @@ -1764,9 +2071,9 @@ public partial class Aks /// /// 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.Api20200901.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) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, string configName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -1778,6 +2085,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"); @@ -1795,15 +2104,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; } // make the call - await this.ManagedClustersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); } } /// - /// Creates or updates a managed cluster with the specified configuration for agents and Kubernetes version. + /// Creates or updates a maintenance configuration in the specified managed cluster. /// /// - /// Parameters supplied to the Create or Update a Managed Cluster operation. + /// 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). @@ -1812,24 +2121,25 @@ public partial class Aks /// /// 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.Api20200901.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) + public async global::System.Threading.Tasks.Task MaintenanceConfigurationsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + 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); + 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/" @@ -1838,6 +2148,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName + + "/maintenanceConfigurations/" + + configName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -1855,11 +2167,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.ManagedClustersCreateOrUpdate_Call(request,onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsCreateOrUpdate_Call(request,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 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -1869,7 +2183,7 @@ 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 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) { using( NoSynchronizationContext ) { @@ -1880,105 +2194,6 @@ public partial class Aks 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; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // 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; - } - } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -1986,13 +2201,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.Api20200901.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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2008,39 +2223,43 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 Create or Update a Managed Cluster operation. + /// 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 ManagedClustersCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster body, 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.Api20230201.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.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); await eventListener.AssertNotNull(nameof(body), body); await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// Deletes the managed cluster with a specified resource group and name. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// Deletes a maintenance configuration. + /// 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 204 (NoContent). /// a delegate that is called when the remote service returns default (any response code not handled /// elsewhere). @@ -2049,9 +2268,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, 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2063,6 +2282,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"); @@ -2076,12 +2297,13 @@ 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.ManagedClustersDelete_Call(request,onNoContent,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Deletes the managed cluster with a specified resource group and name. + /// 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). @@ -2090,24 +2312,25 @@ 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, 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 = @"2020-09-01"; + 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); + 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/" @@ -2116,6 +2339,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName + + "/maintenanceConfigurations/" + + configName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2129,12 +2354,13 @@ 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.ManagedClustersDelete_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). @@ -2143,7 +2369,7 @@ public partial class Aks /// /// 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, 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 ) { @@ -2154,194 +2380,103 @@ public partial class Aks 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; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + 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; } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + 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.Api20230201.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(); + } + } + } - // 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 waiting; + /// + /// 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 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); + } + } - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + /// 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"); - // 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; - } - } - 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.Api20200901.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. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// 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.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - 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 the details of the managed cluster with a specified resource group and name. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// 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 = @"2020-09-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; } + 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}"); @@ -2350,69 +2485,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.ManagedClustersGet_Call(request,onOk,onDefault,eventListener,sender); - } - } - - /// - /// Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and name. **WARNING**: - /// This API will be deprecated. Instead use [ListClusterUserCredentials](https://learn.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - /// or [ListClusterAdminCredentials](https://learn.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - /// . - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// 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. - /// - 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 = @"2020-09-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; } - - // 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); + await this.MaintenanceConfigurationsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Gets the accessProfile for the specified role name of the managed cluster with a specified resource group and name. **WARNING**: - /// This API will be deprecated. Instead use [ListClusterUserCredentials](https://learn.microsoft.com/en-us/rest/api/aks/managedclusters/listclusterusercredentials) - /// or [ListClusterAdminCredentials](https://learn.microsoft.com/en-us/rest/api/aks/managedclusters/listclusteradmincredentials) - /// . - /// + /// 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 @@ -2422,25 +2499,25 @@ public partial class Aks /// /// 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) + 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 = @"2020-09-01"; + 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); + 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}/accessProfiles/{roleName}/listCredential'"); + 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 roleName = _match.Groups["roleName"].Value; + var configName = _match.Groups["configName"].Value; // construct URL var pathAndQuery = global::System.Text.RegularExpressions.Regex.Replace( "/subscriptions/" @@ -2449,9 +2526,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/accessProfiles/" - + roleName - + "/listCredential" + + "/maintenanceConfigurations/" + + configName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2460,16 +2536,16 @@ 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.ManagedClustersGetAccessProfile_Call(request,onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsGet_Call(request,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 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2479,7 +2555,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 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 ) { @@ -2497,13 +2573,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.Api20200901.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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2519,39 +2595,37 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. + /// 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 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 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.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); + await eventListener.AssertNotNull(nameof(configName),configName); } } - /// - /// Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// Gets a list of maintenance configurations 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. /// 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 @@ -2561,9 +2635,9 @@ public partial class Aks /// /// 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 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2575,7 +2649,7 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/upgradeProfiles/default" + + "/maintenanceConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2589,13 +2663,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.ManagedClustersGetUpgradeProfile_Call(request,onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsListByManagedCluster_Call(request,onOk,onDefault,eventListener,sender); } } - /// - /// Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. - /// + /// Gets a list of maintenance configurations in the specified 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 @@ -2605,18 +2677,18 @@ public partial class Aks /// /// 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) + 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 = @"2020-09-01"; + 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); + 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}/upgradeProfiles/default'"); + 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 @@ -2631,7 +2703,7 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/upgradeProfiles/default" + + "/maintenanceConfigurations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2645,11 +2717,13 @@ 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.ManagedClustersGetUpgradeProfile_Call(request,onOk,onDefault,eventListener,sender); + await this.MaintenanceConfigurationsListByManagedCluster_Call(request,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 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -2659,7 +2733,7 @@ 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 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 ) { @@ -2677,13 +2751,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.Api20200901.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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2699,24 +2773,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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 ManagedClustersGetUpgradeProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, 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.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); @@ -2725,10 +2800,14 @@ public partial class Aks } /// - /// Gets the details of the managed cluster with a specified resource group and name. + /// 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 200 (OK). + /// 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 default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -2736,32 +2815,21 @@ 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 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) { - var apiVersion = @"2020-09-01"; + 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 + + global::System.Uri.EscapeDataString(subscriptionId) + "/resourceGroups/" - + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" - + resourceName + + global::System.Uri.EscapeDataString(resourceGroupName) + + "/providers/Microsoft.ContainerService/managedclusters/" + + global::System.Uri.EscapeDataString(resourceName) + + "/abort" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2770,18 +2838,22 @@ 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.ManagedClustersGet_Call(request,onOk,onDefault,eventListener,sender); + await this.ManagedClustersAbortLatestOperation_Call(request,onNoContent,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). + /// + /// 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 default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -2789,7 +2861,3154 @@ public partial class Aks /// /// 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) + 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) + { + 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}/abort'"); + } + + // 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 + + "/abort" + + "?" + + "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.ManagedClustersAbortLatestOperation_Call(request,onNoContent,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 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 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) + { + 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; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // 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; + } + 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.Api20230201.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. + /// + /// 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 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.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]$"); + } + } + + /// Creates or updates 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. + /// 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 ManagedClustersCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + { + 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(null != body ? body.ToJson(null).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); + } + } + + /// Creates or updates 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. + /// + /// 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.Api20230201.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) + { + 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 + + "/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; } + + // 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).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); + } + } + + /// 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 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 + { + 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; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // 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; + } + } + 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.Api20230201.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.Api20230201.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. + /// + /// 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. + /// 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.Api20230201.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.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 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 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 ManagedClustersDelete(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) + { + 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.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.ManagedClustersDelete_Call(request,onNoContent,onDefault,eventListener,sender); + } + } + + /// Deletes 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 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 ManagedClustersDeleteViaIdentity(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) + { + 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 + + "/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; } + + // 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.ManagedClustersDelete_Call(request,onNoContent,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 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 ManagedClustersDelete_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) + { + 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; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: default + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // 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; + } + } + 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.Api20230201.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. + /// + /// 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 ) + { + // 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.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.ManagedClustersGet_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) + /// . + /// + /// 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. + /// 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 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"; + // 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; } + + // 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) + /// . + /// + /// + /// 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 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}/listCredential'"); + } + + // 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); + } + } + + /// 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 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 ) + { + 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; } + 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.Api20230201.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.Api20230201.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. + /// + /// 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. + /// + /// 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) + { + 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(roleName),roleName); + } + } + + /// 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. + /// 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. + /// + 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, global::System.Threading.Tasks.Task> 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"; + // 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"); + + 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.ManagedClustersGetCommandResult_Call(request,onOk,onAccepted,onDefault,eventListener,sender); + } + } + + /// Gets the results of a command which has been run 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 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. + /// + public async global::System.Threading.Tasks.Task ManagedClustersGetCommandResultViaIdentity(global::System.String viaIdentity, global::System.Func, global::System.Threading.Tasks.Task> onOk, global::System.Func, global::System.Threading.Tasks.Task> 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"; + // 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) + { + 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/" + + 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; } + + // 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.ManagedClustersGetCommandResult_Call(request,onOk,onAccepted,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 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, global::System.Threading.Tasks.Task> 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; } + 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.Api20230201.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,null /* deserializeFromResponse doesn't support '-header-' C:\Users\cloudtest\.autorest\@autorest_powershell@3.0.504\node_modules\@autorest\powershell\dist\llcsharp\schema\object.js*/); + 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.Api20230201.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. + /// + /// 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. + /// + /// 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) + { + 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(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 + /// 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 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) + { + 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/locations/" + + global::System.Uri.EscapeDataString(location) + + "/osOptions/default" + + "?" + + "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); + 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.ManagedClustersGetOSOptions_Call(request,onOk,onDefault,eventListener,sender); + } + } + + /// Gets supported OS options in the specified subscription. + /// + /// The resource type for which the OS options needs 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 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) + { + 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/(?[^/]+)/providers/Microsoft.ContainerService/locations/(?[^/]+)/osOptions/default$", 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'"); + } + + // 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 + + "/osOptions/default" + + "?" + + "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); + 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.ManagedClustersGetOSOptions_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 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) + { + 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; } + 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.Api20230201.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.Api20230201.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. + /// + /// 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); + } + } + + /// 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. + /// 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 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"; + // 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"); + + 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. + /// + /// 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 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"; + // 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) + { + 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); + } + } + + /// 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 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 ) + { + 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; } + 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.Api20230201.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.Api20230201.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. + /// + /// 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 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.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. + /// + /// 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 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"; + // 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; } + + // 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.ManagedClustersGet_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 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; } + 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.Api20230201.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.Api20230201.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. + /// + /// 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 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.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. + /// 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 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"; + // 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; } + + // 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); + } + } + + /// Lists managed clusters in the specified subscription and resource group. + /// The ID of the target subscription. + /// 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. + /// + /// 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) + { + 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" + + "?" + + "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. + /// + /// 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 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"; + // 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; } + + // 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); + } + } + + /// 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; } + 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.Api20230201.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.Api20230201.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. + /// + /// The ID of the target subscription. + /// 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.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); + } + } + + /// Lists the admin 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 + /// 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 = @"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) + + "/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 = @"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}/listClusterAdminCredential'"); + } + + // 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); + } + } + + /// + /// 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; } + 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.Api20230201.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.Api20230201.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. + /// + /// 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 + /// 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.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); + } + } + + /// 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 + /// 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 = @"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) + + "/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 = @"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}/listClusterMonitoringUserCredential'"); + } + + // 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); + } + } + + /// + /// 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; } + 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.Api20230201.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.Api20230201.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. + /// + /// 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 + /// 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.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); + } + } + + /// Lists the 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 + /// 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, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format? 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 = @"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) + + "/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, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format? 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 = @"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}/listClusterUserCredential'"); + } + + // 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); + } + } + + /// + /// 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; } + 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.Api20230201.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.Api20230201.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. + /// + /// 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 + /// 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, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format? format, 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.AssertNotNull(nameof(format),format); + await eventListener.AssertEnum(nameof(format),format,@"azure", @"exec"); + } + } + + /// + /// 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 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 = @"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) + + "/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 = @"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/(?[^/]+)/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); + } + } + + /// + /// 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; } + 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.Api20230201.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.Api20230201.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. + /// + /// 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 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.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 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 = @"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/(?[^/]+)/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); + } + } + + /// 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; } + 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.Api20230201.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.Api20230201.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. + /// + /// The ID of the target subscription. + /// 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.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); + } + } + + /// + /// **WARNING**: This API will be deprecated. Please see [AKS-managed Azure Active Directory integration](https://aka.ms/aks-managed-aad) + /// to update your cluster with AKS-managed Azure AD. + /// + /// The ID of the target subscription. + /// The 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. + /// + /// 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.Api20230201.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) + { + 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) + + "/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).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 update 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. + /// + /// 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.Api20230201.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) + { + 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}/resetAADProfile'"); + } + + // 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).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); + } + } + + /// 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 + { + 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; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // 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; + } + 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.Api20230201.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. + /// + /// 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 + /// 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.Api20230201.IManagedClusterAadProfile 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); + } + } + + /// + /// This action cannot be performed on a cluster that is not using a service principal + /// + /// 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 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. + /// + /// 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.Api20230201.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) + { + 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) + + "/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).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. + /// + /// 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.Api20230201.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) + { + 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}/resetServicePrincipalProfile'"); + } + + // 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).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); + } + } + + /// + /// 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 ) { @@ -2800,6 +6019,103 @@ public partial class Aks 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; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // 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; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -2807,13 +6123,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.Api20200901.ManagedCluster.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + 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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -2829,80 +6145,43 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 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 ManagedClustersGet_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersResetServicePrincipalProfile_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile 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); } } /// - /// Gets a list of managed clusters in the specified subscription. The operation returns properties of each managed cluster. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// 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 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 = @"2020-09-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; } - - // 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); - } - } - - /// - /// Lists managed clusters in the specified subscription and resource group. The operation returns properties of each managed - /// cluster. + /// See [Certificate rotation](https://docs.microsoft.com/azure/aks/certificate-rotation) for more details about rotating + /// managed cluster certificates. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// a delegate that is called when the remote service returns 200 (OK). + /// 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 default (any response code not handled /// elsewhere). /// an instance that will receive events. @@ -2910,9 +6189,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 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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -2922,7 +6201,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) + + "/rotateClusterCertificates" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2931,21 +6212,21 @@ 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.ManagedClustersRotateClusterCertificates_Call(request,onNoContent,onDefault,eventListener,sender); } } /// - /// Lists managed clusters in the specified subscription and resource group. The operation returns properties of each managed - /// cluster. + /// 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 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. @@ -2953,30 +6234,33 @@ 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 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) { - var apiVersion = @"2020-09-01"; + 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); + 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'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateClusterCertificates'"); } // 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" + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/rotateClusterCertificates" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -2985,18 +6269,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.ManagedClustersRotateClusterCertificates_Call(request,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. @@ -3004,7 +6290,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 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) { using( NoSynchronizationContext ) { @@ -3015,20 +6301,117 @@ public partial class Aks 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; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // 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; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.OK: + case global::System.Net.HttpStatusCode.NoContent: { 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.Api20200901.ManagedClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + 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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3044,34 +6427,37 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 ManagedClustersListByResourceGroup_Validate(string subscriptionId, string resourceGroupName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + 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.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 cluster admin credential of the managed cluster with a specified resource group and name. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// Rotates the service account signing keys 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. - /// 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. @@ -3079,9 +6465,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, 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 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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3093,7 +6479,7 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/listClusterAdminCredential" + + "/rotateServiceAccountSigningKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3107,15 +6493,13 @@ 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.ManagedClustersListClusterAdminCredentials_Call(request,onOk,onDefault,eventListener,sender); + await this.ManagedClustersRotateServiceAccountSigningKeys_Call(request,onNoContent,onDefault,eventListener,sender); } } - /// - /// Gets cluster admin credential of the managed cluster with a specified resource group and name. - /// + /// Rotates the service account signing keys 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 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. @@ -3123,9 +6507,9 @@ 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, 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 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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3134,7 +6518,7 @@ public partial class Aks 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}/listClusterAdminCredential'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys'"); } // replace URI parameters with values from identity @@ -3149,7 +6533,7 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/listClusterAdminCredential" + + "/rotateServiceAccountSigningKeys" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3163,15 +6547,15 @@ 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.ManagedClustersListClusterAdminCredentials_Call(request,onOk,onDefault,eventListener,sender); + await this.ManagedClustersRotateServiceAccountSigningKeys_Call(request,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. @@ -3179,7 +6563,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 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) { using( NoSynchronizationContext ) { @@ -3190,20 +6574,117 @@ public partial class Aks 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; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // 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; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.OK: + case global::System.Net.HttpStatusCode.NoContent: { 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.Api20200901.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + 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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3219,24 +6700,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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 ManagedClustersListClusterAdminCredentials_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + 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.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); @@ -3245,12 +6727,13 @@ public partial class Aks } /// - /// Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS + /// Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 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). @@ -3259,9 +6742,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, 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 ManagedClustersRunCommand(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3273,7 +6756,7 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/listClusterMonitoringUserCredential" + + "/runCommand" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3286,15 +6769,21 @@ 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(null != body ? body.ToJson(null).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.ManagedClustersListClusterMonitoringUserCredentials_Call(request,onOk,onDefault,eventListener,sender); + await this.ManagedClustersRunCommand_Call(request,onOk,onDefault,eventListener,sender); } } /// - /// Gets cluster monitoring user credential of the managed cluster with a specified resource group and name. + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS + /// Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). /// /// + /// The 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). @@ -3303,9 +6792,9 @@ 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, 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 ManagedClustersRunCommandViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3314,7 +6803,7 @@ public partial class Aks 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}/listClusterMonitoringUserCredential'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand'"); } // replace URI parameters with values from identity @@ -3329,7 +6818,7 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/listClusterMonitoringUserCredential" + + "/runCommand" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3342,34 +6831,133 @@ 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(null != body ? body.ToJson(null).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.ManagedClustersListClusterMonitoringUserCredentials_Call(request,onOk,onDefault,eventListener,sender); + await this.ManagedClustersRunCommand_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 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; } + /// 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 + { + 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; } + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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 ) + { + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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"); + } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); + await waiting; + + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } + + // 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; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -3377,13 +6965,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.Api20200901.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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3399,39 +6987,42 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 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 ManagedClustersListClusterMonitoringUserCredentials_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + internal async global::System.Threading.Tasks.Task ManagedClustersRunCommand_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequest 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); } } /// - /// Gets cluster user credential of the managed cluster with a specified resource group and name. + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. @@ -3439,9 +7030,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, 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 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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3453,7 +7044,7 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/listClusterUserCredential" + + "/start" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3467,15 +7058,15 @@ 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.ManagedClustersListClusterUserCredentials_Call(request,onOk,onDefault,eventListener,sender); + await this.ManagedClustersStart_Call(request,onNoContent,onDefault,eventListener,sender); } } /// - /// Gets cluster user credential of the managed cluster with a specified resource group and name. + /// 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 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. @@ -3483,9 +7074,9 @@ 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, 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 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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3494,7 +7085,7 @@ public partial class Aks 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}/listClusterUserCredential'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start'"); } // replace URI parameters with values from identity @@ -3509,7 +7100,7 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/listClusterUserCredential" + + "/start" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3523,15 +7114,13 @@ 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.ManagedClustersListClusterUserCredentials_Call(request,onOk,onDefault,eventListener,sender); + await this.ManagedClustersStart_Call(request,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. @@ -3539,7 +7128,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 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) { using( NoSynchronizationContext ) { @@ -3550,145 +7139,117 @@ public partial class Aks 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; } - var _contentType = _response.Content.Headers.ContentType?.MediaType; - - switch ( _response.StatusCode ) + // this operation supports x-ms-long-running-operation + var _originalUri = request.RequestUri.AbsoluteUri; + // declared final-state-via: location + var _finalUri = _response.GetFirstHeader(@"Location"); + var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); + var location = _response.GetFirstHeader(@"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.Api20200901.CredentialResults.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); - break; + + // get the delay before polling. (default to 30 seconds if not present) + int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } + + // start the delay timer (we'll await later...) + var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + + // 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; } - await onDefault(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudError.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"); } - } - } - finally - { - // finally statements - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); - _response?.Dispose(); - request?.Dispose(); - } - } - } + var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : location : asyncOperation; + request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); - /// - /// Validation method for method. Call this like the actual call, - /// but you will get validation events back. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// 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 ManagedClustersListClusterUserCredentials_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.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - 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]$"); - } - } + // 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 waiting; - /// - /// Gets a list of managed clusters in the specified subscription. The operation returns properties of each 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 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 = @"2020-09-01"; - // Constant Parameters - using( NoSynchronizationContext ) - { - // verify that Identity format is an exact match for uri + // check for cancellation + if( eventListener.Token.IsCancellationRequested ) { return; } - 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'"); - } + // drop the old response + _response?.Dispose(); - // 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"); + // 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; } - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); 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; + } - // 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; } + 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.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } - // make the call - await this.ManagedClustersList_Call(request,onOk,onDefault,eventListener,sender); - } - } + 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); + } + } - /// 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; } + // 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; + } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.OK: + case global::System.Net.HttpStatusCode.NoContent: { 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.Api20200901.ManagedClusterListResult.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); + 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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3704,30 +7265,42 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. + /// 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 ManagedClustersList_Validate(string subscriptionId, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener) + 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.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]$"); } } - /// Update the AAD Profile for a managed cluster. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// + /// 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 name of the resource group. The name is case insensitive. /// The name of the managed cluster resource. - /// Parameters supplied to the Reset AAD Profile operation for 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 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. @@ -3735,9 +7308,9 @@ public partial class Aks /// /// 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.Api20200901.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) + 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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3749,7 +7322,7 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/resetAADProfile" + + "/stop" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3762,19 +7335,19 @@ 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(null != body ? body.ToJson(null).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.ManagedClustersStop_Call(request,onNoContent,onDefault,eventListener,sender); } } - /// Update the AAD Profile for a managed cluster. + /// + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane + /// and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is + /// stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping + /// a cluster. + /// /// - /// Parameters supplied to the Reset AAD Profile operation for 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 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. @@ -3782,9 +7355,9 @@ public partial class Aks /// /// 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.Api20200901.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) + 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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -3793,7 +7366,7 @@ public partial class Aks 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}/resetAADProfile'"); + throw new global::System.Exception("Invalid identity for URI '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop'"); } // replace URI parameters with values from identity @@ -3808,7 +7381,7 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/resetAADProfile" + + "/stop" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -3821,18 +7394,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(null != body ? body.ToJson(null).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.ManagedClustersStop_Call(request,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. @@ -3840,7 +7409,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, global::System.Threading.Tasks.Task> onDefault, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener eventListener, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.ISendAsync sender) { using( NoSynchronizationContext ) { @@ -3853,7 +7422,7 @@ public partial class Aks await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.ResponseCreated, _response); if( eventListener.Token.IsCancellationRequested ) { return; } // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default + // declared final-state-via: location var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"Location"); @@ -3937,34 +7506,31 @@ public partial class Aks 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); + // 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; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) { - case global::System.Net.HttpStatusCode.OK: + case global::System.Net.HttpStatusCode.NoContent: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onOk(_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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -3980,40 +7546,37 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 Reset AAD Profile operation for a 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.Api20200901.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.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); } } - /// Update the service principal Profile for a managed cluster. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// Updates 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. - /// Parameters supplied to the Reset Service Principal Profile operation for 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). @@ -4022,9 +7585,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.Api20200901.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) + public async global::System.Threading.Tasks.Task ManagedClustersUpdateTags(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4036,7 +7599,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"); @@ -4045,7 +7607,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; } @@ -4054,13 +7616,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.ManagedClustersResetServicePrincipalProfile_Call(request,onOk,onDefault,eventListener,sender); + await this.ManagedClustersUpdateTags_Call(request,onOk,onDefault,eventListener,sender); } } - /// Update the service principal Profile for a managed cluster. + /// Updates tags on a managed cluster. /// - /// Parameters supplied to the Reset Service Principal Profile operation for 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). @@ -4069,9 +7631,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.Api20200901.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) + public async global::System.Threading.Tasks.Task ManagedClustersUpdateTagsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4080,7 +7642,7 @@ public partial class Aks 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}/resetServicePrincipalProfile'"); + 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 @@ -4095,7 +7657,6 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/resetServicePrincipalProfile" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4104,7 +7665,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; } @@ -4113,13 +7674,11 @@ 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.ManagedClustersResetServicePrincipalProfile_Call(request,onOk,onDefault,eventListener,sender); + await this.ManagedClustersUpdateTags_Call(request,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 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -4129,7 +7688,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 ) { @@ -4143,7 +7702,6 @@ public partial class Aks // this operation supports x-ms-long-running-operation var _originalUri = request.RequestUri.AbsoluteUri; // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); var location = _response.GetFirstHeader(@"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 ) @@ -4226,10 +7784,10 @@ public partial class Aks continue; } // we are done polling, do a request on final target? - if (!string.IsNullOrWhiteSpace(_finalUri)) + if (!string.IsNullOrWhiteSpace(_originalUri)) { // create a new request with the final uri - request = request.CloneAndDispose(new global::System.Uri(_finalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + request = request.CloneAndDispose(new global::System.Uri(_originalUri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); // drop the old response _response?.Dispose(); @@ -4247,13 +7805,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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4269,25 +7827,26 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 Reset Service Principal Profile operation for a Managed Cluster. + /// 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.Api20200901.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, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.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); @@ -4297,12 +7856,8 @@ public partial class Aks } } - /// Rotate certificates of a managed cluster. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// 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. @@ -4310,21 +7865,15 @@ 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 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 = @"2020-09-01"; + 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) - + "/rotateClusterCertificates" + "/providers/Microsoft.ContainerService/operations" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4333,18 +7882,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.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); } } - /// Rotate certificates of a managed cluster. + /// 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 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. @@ -4352,33 +7901,24 @@ public partial class Aks /// /// 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 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 = @"2020-09-01"; + 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); + 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}/rotateClusterCertificates'"); + 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"); @@ -4387,20 +7927,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.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); } } - /// - /// 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. @@ -4408,7 +7946,7 @@ public partial class Aks /// /// 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 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 ) { @@ -4419,120 +7957,20 @@ public partial class Aks 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; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // 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; - } - } 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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4548,36 +7986,27 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// 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.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - 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]$"); + } } - /// Starts a Stopped Managed Cluster - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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). @@ -4586,9 +8015,9 @@ 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 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4600,7 +8029,8 @@ public partial class Aks + global::System.Uri.EscapeDataString(resourceGroupName) + "/providers/Microsoft.ContainerService/managedClusters/" + global::System.Uri.EscapeDataString(resourceName) - + "/start" + + "/privateEndpointConnections/" + + global::System.Uri.EscapeDataString(privateEndpointConnectionName) + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4609,17 +8039,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.ManagedClustersStart_Call(request,onNoContent,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// Starts a Stopped 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). @@ -4628,24 +8059,25 @@ public partial class Aks /// /// 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 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 = @"2020-09-01"; + 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); + 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}/start'"); + 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/" @@ -4654,7 +8086,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/start" + + "/privateEndpointConnections/" + + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4663,17 +8096,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.ManagedClustersStart_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). @@ -4682,7 +8116,7 @@ public partial class Aks /// /// 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 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 ) { @@ -4797,6 +8231,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; } @@ -4806,7 +8246,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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -4822,37 +8262,42 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. /// 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 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.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); } } - /// Stops a Running Managed Cluster - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// + /// 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). + /// 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. @@ -4860,9 +8305,9 @@ public partial class Aks /// /// 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 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -4874,7 +8319,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"); @@ -4883,18 +8329,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.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.ManagedClustersStop_Call(request,onNoContent,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender); } } - /// Stops a Running Managed 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 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. @@ -4902,24 +8350,25 @@ public partial class Aks /// /// 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 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 = @"2020-09-01"; + 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); + 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}/stop'"); + 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/" @@ -4928,7 +8377,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName - + "/stop" + + "/privateEndpointConnections/" + + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -4937,18 +8387,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.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.ManagedClustersStop_Call(request,onNoContent,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsGet_Call(request,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. @@ -4956,7 +8406,7 @@ public partial class Aks /// /// 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 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 ) { @@ -4967,120 +8417,200 @@ public partial class Aks 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; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + 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,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnection.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.Api20230201.CloudError.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) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } - // 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 waiting; + /// + /// 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 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) + { + 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(privateEndpointConnectionName),privateEndpointConnectionName); + } + } - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + /// + /// 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 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 = @"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" + + "?" + + "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; } - // 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; } - // 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; } + // make the call + await this.PrivateEndpointConnectionsList_Call(request,onOk,onDefault,eventListener,sender); + } + } - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; + /// + /// 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 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 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"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri - 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); - } - } + 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'"); + } - // 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); + // 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 + + "/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; } - // 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; } - // 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.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateEndpointConnectionsList_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 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; } 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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5096,24 +8626,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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 ManagedClustersStop_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.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); @@ -5121,12 +8652,12 @@ public partial class Aks } } - /// Updates a managed cluster with the specified tags. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// Updates 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. - /// Parameters supplied to the Update Managed Cluster Tags operation. + /// 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 default (any response code not handled /// elsewhere). @@ -5135,9 +8666,9 @@ public partial class Aks /// /// 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.Api20200901.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) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdate(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5149,6 +8680,8 @@ public partial class Aks + 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"); @@ -5157,7 +8690,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.Patch, _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; } @@ -5166,13 +8699,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.ManagedClustersUpdateTags_Call(request,onOk,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsUpdate_Call(request,onOk,onDefault,eventListener,sender); } } - /// Updates a managed cluster with the specified tags. + /// Updates a private endpoint connection. /// - /// Parameters supplied to the Update Managed Cluster Tags operation. + /// 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 default (any response code not handled /// elsewhere). @@ -5181,24 +8714,25 @@ public partial class Aks /// /// 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.Api20200901.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) + public async global::System.Threading.Tasks.Task PrivateEndpointConnectionsUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + 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); + 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/" @@ -5207,6 +8741,8 @@ public partial class Aks + resourceGroupName + "/providers/Microsoft.ContainerService/managedClusters/" + resourceName + + "/privateEndpointConnections/" + + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5215,7 +8751,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.Patch, _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; } @@ -5224,11 +8760,11 @@ 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.ManagedClustersUpdateTags_Call(request,onOk,onDefault,eventListener,sender); + await this.PrivateEndpointConnectionsUpdate_Call(request,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 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -5238,7 +8774,7 @@ 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 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) { using( NoSynchronizationContext ) { @@ -5249,105 +8785,189 @@ public partial class Aks 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; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); + 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,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnection.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.Api20230201.CloudError.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) ? _originalUri : location : asyncOperation; - request = request.CloneAndDispose(new global::System.Uri(_uri), Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Method.Get); + } + } + finally + { + // finally statements + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.Finally, request, _response); + _response?.Dispose(); + request?.Dispose(); + } + } + } - // 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 waiting; + /// + /// 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 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.Api20230201.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.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); + } + } - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } + /// + /// 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"); - // drop the old response - _response?.Dispose(); + await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // 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; } - // 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; } + // make the call + await this.PrivateLinkResourcesList_Call(request,onOk,onDefault,eventListener,sender); + } + } - switch( state?.ToString()?.ToLower() ) - { - case "failed": - error = true; - break; - case "succeeded": - case "canceled": - // we're done polling. - break; + /// + /// 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 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 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"; + // Constant Parameters + using( NoSynchronizationContext ) + { + // verify that Identity format is an exact match for uri - 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); - } - } + 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/" + + subscriptionId + + "/resourceGroups/" + + resourceGroupName + + "/providers/Microsoft.ContainerService/managedClusters/" + + resourceName + + "/privateLinkResources" + + "?" + + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) + ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); - // 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.URLCreated, pathAndQuery); if( eventListener.Token.IsCancellationRequested ) { return; } - // 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; } - // 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.HeaderParametersAdded); if( eventListener.Token.IsCancellationRequested ) { return; } + // make the call + await this.PrivateLinkResourcesList_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 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 + { + 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; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5355,13 +8975,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.Api20200901.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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5377,35 +8997,37 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 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.Api20200901.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.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); } } - /// Gets a list of compute operations. + /// Gets the private link service ID for 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. + /// 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). @@ -5414,15 +9036,21 @@ public partial class Aks /// /// 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.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-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"); @@ -5431,17 +9059,22 @@ 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).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 compute 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). @@ -5450,24 +9083,33 @@ public partial class Aks /// /// 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.Api20230201.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) { - var apiVersion = @"2020-09-01"; + 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("^/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}/resolvePrivateLinkServiceId'"); } // 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"); @@ -5476,16 +9118,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; } + // set body content + request.Content = new global::System.Net.Http.StringContent(null != body ? body.ToJson(null).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); } } - /// 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 @@ -5495,7 +9141,7 @@ public partial class Aks /// /// 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) + 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 ) { @@ -5513,13 +9159,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.Api20200901.OperationListResult.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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5535,29 +9181,42 @@ 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. + /// 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 OperationsList_Validate(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.Api20230201.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.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 the private endpoint connection in the specified managed cluster. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// Creates or updates 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. - /// 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 204 (NoContent). + /// 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. @@ -5565,9 +9224,9 @@ public partial class Aks /// /// 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) + public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5577,10 +9236,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"); @@ -5589,19 +9246,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.Delete, _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).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.PrivateEndpointConnectionsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); + await this.SnapshotsCreateOrUpdate_Call(request,onOk,onCreated,onDefault,eventListener,sender); } } - /// Deletes the private endpoint connection in the specified managed cluster. + /// Creates or updates 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 204 (NoContent). + /// 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. @@ -5609,35 +9271,32 @@ public partial class Aks /// /// 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) + public async global::System.Threading.Tasks.Task SnapshotsCreateOrUpdateViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + 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); + 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 + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + resourceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5646,137 +9305,41 @@ 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); - 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); - } - } - - /// 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 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 ) - { - 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; } - // this operation supports x-ms-long-running-operation - var _originalUri = request.RequestUri.AbsoluteUri; - // declared final-state-via: default - var _finalUri = _response.GetFirstHeader(@"Location"); - var asyncOperation = _response.GetFirstHeader(@"Azure-AsyncOperation"); - var location = _response.GetFirstHeader(@"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 ) - { - - // get the delay before polling. (default to 30 seconds if not present) - int delay = (int)(_response.Headers.RetryAfter?.Delta?.TotalSeconds ?? 30); - await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.DelayBeforePolling, $"Delaying {delay} seconds before polling.", _response); if( eventListener.Token.IsCancellationRequested ) { return; } - - // start the delay timer (we'll await later...) - var waiting = global::System.Threading.Tasks.Task.Delay(delay * 1000, eventListener.Token ); - - // 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"); - } - var _uri = global::System.String.IsNullOrEmpty(asyncOperation) ? global::System.String.IsNullOrEmpty(location) ? _originalUri : 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(); - await waiting; - - // check for cancellation - if( eventListener.Token.IsCancellationRequested ) { return; } - - // 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); + 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; } - // drop the old response - _response?.Dispose(); + 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).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); + } + } - // 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; - } - } + /// 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; } var _contentType = _response.Content.Headers.ContentType?.MediaType; switch ( _response.StatusCode ) @@ -5784,19 +9347,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); + await onOk(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.Snapshot.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } - case global::System.Net.HttpStatusCode.NoContent: + case global::System.Net.HttpStatusCode.Created: { await eventListener.Signal(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Events.BeforeResponseDispatch, _response); if( eventListener.Token.IsCancellationRequested ) { return; } - await onNoContent(_response); + await onCreated(_response,_response.Content.ReadAsStringAsync().ContinueWith( body => Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5812,42 +9375,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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 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 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 SnapshotsCreateOrUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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(privateEndpointConnectionName),privateEndpointConnectionName); + await eventListener.AssertNotNull(nameof(body), body); + await eventListener.AssertObjectIsValid(nameof(body), body); } } - /// - /// Gets the details of the private endpoint connection by managed cluster and resource group. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. - /// 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. @@ -5855,9 +9417,9 @@ public partial class Aks /// /// 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 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -5867,10 +9429,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"); @@ -5879,20 +9439,19 @@ 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.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender); + await this.SnapshotsDelete_Call(request,onOk,onNoContent,onDefault,eventListener,sender); } } - /// - /// Gets the details of the private endpoint connection by managed cluster and resource group. - /// + /// 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. @@ -5900,35 +9459,32 @@ public partial class Aks /// /// 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 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 = @"2020-09-01"; + 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); + 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 + "/resourceGroups/" + resourceGroupName - + "/providers/Microsoft.ContainerService/managedClusters/" + + "/providers/Microsoft.ContainerService/snapshots/" + resourceName - + "/privateEndpointConnections/" - + privateEndpointConnectionName + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -5937,18 +9493,19 @@ 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.PrivateEndpointConnectionsGet_Call(request,onOk,onDefault,eventListener,sender); + 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. @@ -5956,7 +9513,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 ) { @@ -5974,13 +9531,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.Api20200901.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -5996,40 +9559,35 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. /// 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.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); } } - /// - /// Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of each - /// private endpoint connection. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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. /// 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 @@ -6039,9 +9597,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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6051,9 +9609,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"); @@ -6067,14 +9624,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); } } - /// - /// Gets a list of private endpoint connections in the specified managed cluster. The operation returns properties of each - /// private endpoint connection. - /// + /// 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 @@ -6084,18 +9638,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 = @"2020-09-01"; + 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); + 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 @@ -6108,9 +9662,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"); @@ -6124,11 +9677,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); } } - /// 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 @@ -6138,7 +9691,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 ) { @@ -6156,13 +9709,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.Api20200901.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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6178,24 +9731,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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 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.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); @@ -6203,13 +9757,47 @@ public partial class Aks } } - /// Updates a private endpoint connection in the specified managed cluster. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the managed cluster resource. - /// The name of the private endpoint connection. - /// Parameters supplied to the Update a private endpoint connection operation. + /// 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. + /// 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). @@ -6218,9 +9806,9 @@ public partial class Aks /// /// 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.Api20200901.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) + 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 = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6230,10 +9818,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"); @@ -6242,22 +9827,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).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); } } - /// Updates a private endpoint connection in the specified managed cluster. + /// Lists snapshots in the specified subscription and resource group. /// - /// Parameters supplied to the Update a private endpoint connection 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). @@ -6266,35 +9846,30 @@ public partial class Aks /// /// 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.Api20200901.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) + 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 = @"2020-09-01"; + 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); + 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'"); } // 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 + + "/providers/Microsoft.ContainerService/snapshots" + "?" + "api-version=" + global::System.Uri.EscapeDataString(apiVersion) ,"\\?&*$|&*$|(\\?)&+|(&)&+","$1$2"); @@ -6303,20 +9878,16 @@ 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).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); } } - /// 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 @@ -6326,7 +9897,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 ) { @@ -6344,13 +9915,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.Api20200901.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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6366,88 +9937,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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the managed cluster resource. - /// The name of the private endpoint connection. - /// Parameters supplied to the Update a private endpoint connection operation. + /// The ID of the target subscription. + /// 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 PrivateEndpointConnectionsUpdate_Validate(string subscriptionId, string resourceGroupName, string resourceName, string privateEndpointConnectionName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.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.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - 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); - } - } - - /// - /// Gets a list of private link resources in the specified managed cluster. The operation returns properties of each private - /// link resource. - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// 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 = @"2020-09-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); + await eventListener.AssertMaximumLength(nameof(resourceGroupName),resourceGroupName,90); } } - /// - /// Gets a list of private link resources in the specified managed cluster. The operation returns properties of each private - /// link resource. - /// + /// 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 @@ -6457,33 +9968,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 = @"2020-09-01"; + 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/(?[^/]+)/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"); @@ -6497,11 +10002,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.PrivateLinkResourcesList_Call(request,onOk,onDefault,eventListener,sender); + await this.SnapshotsList_Call(request,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 200 (OK). /// a delegate that is called when the remote service returns default (any response code not handled @@ -6511,7 +10016,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 ) { @@ -6529,13 +10034,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.Api20200901.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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6551,37 +10056,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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. - /// The name of the managed cluster resource. + /// The ID of the target subscription. /// 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.AssertNotNull(nameof(resourceGroupName),resourceGroupName); - await eventListener.AssertMinimumLength(nameof(resourceGroupName),resourceGroupName,1); - 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.AssertMinimumLength(nameof(subscriptionId),subscriptionId,1); } } - /// Gets the private link service ID the specified managed cluster. - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// Updates 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 (name, groupId) supplied 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). @@ -6590,9 +10086,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.Api20200901.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) + public async global::System.Threading.Tasks.Task SnapshotsUpdateTags(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + var apiVersion = @"2023-02-01"; // Constant Parameters using( NoSynchronizationContext ) { @@ -6602,9 +10098,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"); @@ -6613,7 +10108,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; } @@ -6622,13 +10117,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 the specified managed cluster. + /// Updates tags on a snapshot. /// - /// Parameters (name, groupId) supplied 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). @@ -6637,18 +10132,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.Api20200901.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) + public async global::System.Threading.Tasks.Task SnapshotsUpdateTagsViaIdentity(global::System.String viaIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) { - var apiVersion = @"2020-09-01"; + 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); + 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}/resolvePrivateLinkServiceId'"); + 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 @@ -6661,9 +10156,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"); @@ -6672,7 +10166,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; } @@ -6681,11 +10175,11 @@ 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); } } - /// 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 @@ -6695,7 +10189,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 ) { @@ -6713,13 +10207,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.Api20200901.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.Api20230201.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.Api20200901.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.Api20230201.CloudError.FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(body.Result)) )); break; } } @@ -6735,25 +10229,26 @@ 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. /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription - /// ID forms part of the URI for every service call. - /// The name of the resource group. + /// 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 (name, groupId) supplied 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.Api20200901.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.Api20230201.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.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); diff --git a/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..46b155ff1247 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest 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(AgentPoolsAbortLatestOperationAcceptedResponseHeadersTypeConverter))] + public partial class AgentPoolsAbortLatestOperationAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AgentPoolsAbortLatestOperationAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal)this).AzureAsyncOperation, 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 AgentPoolsAbortLatestOperationAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal)this).AzureAsyncOperation, 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.IAgentPoolsAbortLatestOperationAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentPoolsAbortLatestOperationAcceptedResponseHeaders(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.IAgentPoolsAbortLatestOperationAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentPoolsAbortLatestOperationAcceptedResponseHeaders(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.IAgentPoolsAbortLatestOperationAcceptedResponseHeaders 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(); + } + [System.ComponentModel.TypeConverter(typeof(AgentPoolsAbortLatestOperationAcceptedResponseHeadersTypeConverter))] + public partial interface IAgentPoolsAbortLatestOperationAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..7cb4ec87fe37 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.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 AgentPoolsAbortLatestOperationAcceptedResponseHeadersTypeConverter : 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.IAgentPoolsAbortLatestOperationAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AgentPoolsAbortLatestOperationAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AgentPoolsAbortLatestOperationAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AgentPoolsAbortLatestOperationAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..985d87aede23 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.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; + + public partial class AgentPoolsAbortLatestOperationAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public AgentPoolsAbortLatestOperationAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader1) is string __headerAzureAsyncOperationHeader1 ? __headerAzureAsyncOperationHeader1 : (string)null; + } + } + } + public partial interface IAgentPoolsAbortLatestOperationAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IAgentPoolsAbortLatestOperationAcceptedResponseHeadersInternal + + { + string AzureAsyncOperation { get; set; } + + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..4d69cb2fde4a --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsAbortLatestOperationAcceptedResponseHeaders.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; + + public partial class AgentPoolsAbortLatestOperationAcceptedResponseHeaders + { + + /// + /// 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 AgentPoolsAbortLatestOperationAcceptedResponseHeaders(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.IAgentPoolsAbortLatestOperationAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsAbortLatestOperationAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolsAbortLatestOperationAcceptedResponseHeaders(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/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..979e4ab3cc67 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.PowerShell.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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(AgentPoolsDeleteAcceptedResponseHeadersTypeConverter))] + public partial class AgentPoolsDeleteAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AgentPoolsDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeadersInternal)this).Location, 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 AgentPoolsDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeadersInternal)this).Location, 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.IAgentPoolsDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentPoolsDeleteAcceptedResponseHeaders(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.IAgentPoolsDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentPoolsDeleteAcceptedResponseHeaders(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.IAgentPoolsDeleteAcceptedResponseHeaders 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(); + } + [System.ComponentModel.TypeConverter(typeof(AgentPoolsDeleteAcceptedResponseHeadersTypeConverter))] + public partial interface IAgentPoolsDeleteAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..e9c7da49ec7f --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.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 AgentPoolsDeleteAcceptedResponseHeadersTypeConverter : 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.IAgentPoolsDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AgentPoolsDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AgentPoolsDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AgentPoolsDeleteAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..b6e9630085bf --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest 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 AgentPoolsDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Creates an new instance. + public AgentPoolsDeleteAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IAgentPoolsDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IAgentPoolsDeleteAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.json.cs similarity index 77% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.json.cs index 37d7b2a7129d..dd3e99090fd7 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/AgentPoolsDeleteAcceptedResponseHeaders.json.cs @@ -3,12 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Profile for diagnostics on the container service cluster. - public partial class ContainerServiceDiagnosticsProfile + public partial class AgentPoolsDeleteAcceptedResponseHeaders { /// @@ -54,10 +53,10 @@ public partial class ContainerServiceDiagnosticsProfile 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 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 ContainerServiceDiagnosticsProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal AgentPoolsDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -65,31 +64,31 @@ internal ContainerServiceDiagnosticsProfile(Microsoft.Azure.PowerShell.Cmdlets.A { return; } - {_vMDiagnostic = If( json?.PropertyT("vmDiagnostics"), out var __jsonVMDiagnostics) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceVMDiagnostics.FromJson(__jsonVMDiagnostics) : VMDiagnostic;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeaders. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeaders. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAgentPoolsDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ContainerServiceDiagnosticsProfile(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolsDeleteAcceptedResponseHeaders(json) : null; } /// - /// Serializes this instance of into a 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,7 +100,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - AddIf( null != this._vMDiagnostic ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._vMDiagnostic.ToJson(null,serializationMode) : null, "vmDiagnostics" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.PowerShell.cs index 9572a97f6b06..514afb0ca55b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.PowerShell.cs @@ -71,6 +71,10 @@ internal AksIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Location, global::System.Convert.ToString); + } if (content.Contains("ResourceGroupName")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); @@ -83,6 +87,14 @@ internal AksIdentity(global::System.Collections.IDictionary content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).RoleName = (string) content.GetValueForProperty("RoleName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).RoleName, global::System.Convert.ToString); } + if (content.Contains("CommandId")) + { + ((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("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); + } if (content.Contains("AgentPoolName")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).AgentPoolName = (string) content.GetValueForProperty("AgentPoolName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).AgentPoolName, global::System.Convert.ToString); @@ -91,10 +103,6 @@ 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("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Location, 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); @@ -120,6 +128,10 @@ internal AksIdentity(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).SubscriptionId = (string) content.GetValueForProperty("SubscriptionId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).SubscriptionId, global::System.Convert.ToString); } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Location, global::System.Convert.ToString); + } if (content.Contains("ResourceGroupName")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).ResourceGroupName = (string) content.GetValueForProperty("ResourceGroupName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).ResourceGroupName, global::System.Convert.ToString); @@ -132,6 +144,14 @@ internal AksIdentity(global::System.Management.Automation.PSObject content) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).RoleName = (string) content.GetValueForProperty("RoleName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).RoleName, global::System.Convert.ToString); } + if (content.Contains("CommandId")) + { + ((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("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); + } if (content.Contains("AgentPoolName")) { ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).AgentPoolName = (string) content.GetValueForProperty("AgentPoolName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).AgentPoolName, global::System.Convert.ToString); @@ -140,10 +160,6 @@ 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("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentityInternal)this).Location, 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/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.cs b/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.cs index eab72db4feec..889928302faa 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.cs @@ -19,6 +19,20 @@ public partial class AksIdentity : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string AgentPoolName { get => this._agentPoolName; set => this._agentPoolName = value; } + /// Backing field for property. + private string _commandId; + + /// Id of the command. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string CommandId { get => this._commandId; set => this._commandId = value; } + + /// Backing field for property. + private string _configName; + + /// The name of the maintenance configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ConfigName { get => this._configName; set => this._configName = value; } + /// Backing field for property. private string _id; @@ -29,7 +43,7 @@ public partial class AksIdentity : /// Backing field for property. private string _location; - /// The name of a supported Azure region. + /// The name of 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; } @@ -43,7 +57,7 @@ public partial class AksIdentity : /// Backing field for property. private string _resourceGroupName; - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ResourceGroupName { get => this._resourceGroupName; set => this._resourceGroupName = value; } @@ -64,10 +78,7 @@ public partial class AksIdentity : /// Backing field for property. private string _subscriptionId; - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI - /// for every service call. - /// + /// The ID of the target subscription. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string SubscriptionId { get => this._subscriptionId; set => this._subscriptionId = value; } @@ -88,6 +99,22 @@ public partial interface IAksIdentity : SerializedName = @"agentPoolName", PossibleTypes = new [] { typeof(string) })] string AgentPoolName { get; set; } + /// Id of the command. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Id of the command.", + SerializedName = @"commandId", + PossibleTypes = new [] { typeof(string) })] + string CommandId { get; set; } + /// The name of the maintenance configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the maintenance configuration.", + SerializedName = @"configName", + PossibleTypes = new [] { typeof(string) })] + string ConfigName { get; set; } /// Resource identity path [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, @@ -96,11 +123,11 @@ public partial interface IAksIdentity : SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } - /// The name of a supported Azure region. + /// The name of Azure region. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The name of a supported Azure region.", + Description = @"The name of Azure region.", SerializedName = @"location", PossibleTypes = new [] { typeof(string) })] string Location { get; set; } @@ -112,11 +139,11 @@ public partial interface IAksIdentity : SerializedName = @"privateEndpointConnectionName", PossibleTypes = new [] { typeof(string) })] string PrivateEndpointConnectionName { get; set; } - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The name of the resource group.", + Description = @"The name of the resource group. The name is case insensitive.", SerializedName = @"resourceGroupName", PossibleTypes = new [] { typeof(string) })] string ResourceGroupName { get; set; } @@ -136,14 +163,11 @@ public partial interface IAksIdentity : SerializedName = @"roleName", PossibleTypes = new [] { typeof(string) })] string RoleName { get; set; } - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI - /// for every service call. - /// + /// The ID of the target subscription. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] string SubscriptionId { get; set; } @@ -154,22 +178,23 @@ internal partial interface IAksIdentityInternal { /// The name of the agent pool. string AgentPoolName { get; set; } + /// Id of the command. + string CommandId { get; set; } + /// The name of the maintenance configuration. + string ConfigName { get; set; } /// Resource identity path string Id { get; set; } - /// The name of a supported Azure region. + /// The name of Azure region. string Location { get; set; } /// The name of the private endpoint connection. string PrivateEndpointConnectionName { get; set; } - /// The name of the resource group. + /// The name of the resource group. The name is case insensitive. string ResourceGroupName { get; set; } /// The name of the managed cluster resource. string ResourceName { get; set; } /// The name of the role for managed cluster accessProfile resource. string RoleName { get; set; } - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI - /// for every service call. - /// + /// The ID of the target subscription. string SubscriptionId { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.json.cs index 80c510d7a03a..4e2ea0f1d0f5 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/AksIdentity.json.cs @@ -65,12 +65,14 @@ internal AksIdentity(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObj return; } {_subscriptionId = If( json?.PropertyT("subscriptionId"), out var __jsonSubscriptionId) ? (string)__jsonSubscriptionId : (string)SubscriptionId;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} {_resourceGroupName = If( json?.PropertyT("resourceGroupName"), out var __jsonResourceGroupName) ? (string)__jsonResourceGroupName : (string)ResourceGroupName;} {_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;} + {_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;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} AfterFromJson(json); } @@ -105,12 +107,14 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro return container; } AddIf( null != (((object)this._subscriptionId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._subscriptionId.ToString()) : null, "subscriptionId" ,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 ); AddIf( null != (((object)this._resourceGroupName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._resourceGroupName.ToString()) : null, "resourceGroupName" ,container.Add ); 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._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._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 ); 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/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.PowerShell.cs deleted file mode 100644 index ad4d5bd234cb..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.PowerShell.cs +++ /dev/null @@ -1,392 +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.Api20200901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - - /// Agent Pool. - [System.ComponentModel.TypeConverter(typeof(AgentPoolTypeConverter))] - public partial class AgentPool - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal AgentPool(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.Api20200901.IAgentPoolInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("OSType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); - } - if (content.Contains("UpgradeSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("Count")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VMSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).VMSize = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes?) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).VMSize, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes.CreateFrom); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSDiskType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); - } - if (content.Contains("VnetSubnetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).VnetSubnetId, global::System.Convert.ToString); - } - if (content.Contains("MaxPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MaxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MinCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EnableAutoScaling")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PropertiesType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PropertiesType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PropertiesType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); - } - if (content.Contains("Mode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); - } - if (content.Contains("OrchestratorVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OrchestratorVersion, global::System.Convert.ToString); - } - if (content.Contains("NodeImageVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeImageVersion, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("AvailabilityZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("EnableNodePublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ScaleSetPriority")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); - } - if (content.Contains("ScaleSetEvictionPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); - } - if (content.Contains("SpotMaxPrice")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeLabel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeTaint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ProximityPlacementGroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ProximityPlacementGroupId, global::System.Convert.ToString); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("UpgradeSettingMaxSurge")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).UpgradeSettingMaxSurge, 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 AgentPool(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.Api20200901.IAgentPoolInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("OSType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); - } - if (content.Contains("UpgradeSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("Count")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VMSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).VMSize = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes?) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).VMSize, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes.CreateFrom); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSDiskType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); - } - if (content.Contains("VnetSubnetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).VnetSubnetId, global::System.Convert.ToString); - } - if (content.Contains("MaxPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MaxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MinCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EnableAutoScaling")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("PropertiesType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PropertiesType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PropertiesType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); - } - if (content.Contains("Mode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); - } - if (content.Contains("OrchestratorVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).OrchestratorVersion, global::System.Convert.ToString); - } - if (content.Contains("NodeImageVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeImageVersion, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("AvailabilityZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("EnableNodePublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ScaleSetPriority")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); - } - if (content.Contains("ScaleSetEvictionPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); - } - if (content.Contains("SpotMaxPrice")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeLabel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeTaint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ProximityPlacementGroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).ProximityPlacementGroupId, global::System.Convert.ToString); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("UpgradeSettingMaxSurge")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal)this).UpgradeSettingMaxSurge, 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.Api20200901.IAgentPool DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new AgentPool(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.Api20200901.IAgentPool DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new AgentPool(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.Api20200901.IAgentPool 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(); - } - /// Agent Pool. - [System.ComponentModel.TypeConverter(typeof(AgentPoolTypeConverter))] - public partial interface IAgentPool - - { - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.cs deleted file mode 100644 index 62f1d75d5dca..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.cs +++ /dev/null @@ -1,540 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Agent Pool. - public partial class AgentPool : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.SubResource(); - - /// Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string[] AvailabilityZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).AvailabilityZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).AvailabilityZone = value ?? null /* arrayOf */; } - - /// - /// Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user - /// pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? Count { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Count = value ?? default(int); } - - /// 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.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableAutoScaling; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableAutoScaling = value ?? default(bool); } - - /// Enable public IP for nodes - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool? EnableNodePublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableNodePublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableNodePublicIP = value ?? default(bool); } - - /// 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.Api20200901.ISubResourceInternal)__subResource).Id; } - - /// Maximum number of nodes for auto-scaling - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? MaxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MaxCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MaxCount = value ?? default(int); } - - /// Maximum number of pods that can run on a node. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? MaxPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MaxPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MaxPod = value ?? default(int); } - - /// Internal Acessors for NodeImageVersion - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion = value; } - - /// Internal Acessors for PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerState = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for UpgradeSetting - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolInternal.UpgradeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSetting = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)__subResource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)__subResource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)__subResource).Type = value; } - - /// 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.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MinCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MinCount = value ?? default(int); } - - /// AgentPoolMode represents mode of an agent pool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Mode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Mode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode)""); } - - /// - /// 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.Api20200901.ISubResourceInternal)__subResource).Name; } - - /// 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.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion; } - - /// Agent pool node labels to be persisted across all nodes in agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeLabel = value ?? null /* model class */; } - - /// - /// Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string[] NodeTaint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeTaint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeTaint = value ?? null /* arrayOf */; } - - /// - /// OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, - /// it will apply the default osDisk size according to the vmSize specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskSizeGb = value ?? default(int); } - - /// - /// OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to - /// 'Managed'. May not be changed after creation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType)""); } - - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType)""); } - - /// Version of orchestrator specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string OrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OrchestratorVersion = value ?? null; } - - /// Tells whether the cluster is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerStateCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerStateCode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } - - /// AgentPoolType represents types of an agent pool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? PropertiesType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType)""); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties _property; - - /// Properties of an agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileProperties()); set => this._property = value; } - - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState; } - - /// The ID for Proximity Placement Group. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string ProximityPlacementGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProximityPlacementGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProximityPlacementGroupId = value ?? null; } - - /// - /// ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetEvictionPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetEvictionPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy)""); } - - /// - /// ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? ScaleSetPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetPriority = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority)""); } - - /// - /// SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal - /// value greater than zero or -1 which indicates default price to be up-to on-demand. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public float? SpotMaxPrice { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SpotMaxPrice; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SpotMaxPrice = value ?? default(float); } - - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Tag = value ?? null /* model class */; } - - /// 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.Api20200901.ISubResourceInternal)__subResource).Type; } - - /// - /// Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string UpgradeSettingMaxSurge { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingMaxSurge; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingMaxSurge = value ?? null; } - - /// Size of agent VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes? VMSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VMSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VMSize = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes)""); } - - /// VNet SubnetID specifies the VNet's subnet identifier. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string VnetSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VnetSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VnetSubnetId = value ?? null; } - - /// Creates an new instance. - public AgentPool() - { - - } - - /// 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); - } - } - /// Agent Pool. - public partial interface IAgentPool : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResource - { - /// Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType.", - SerializedName = @"availabilityZones", - PossibleTypes = new [] { typeof(string) })] - string[] AvailabilityZone { get; set; } - /// - /// Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user - /// pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1.", - SerializedName = @"count", - PossibleTypes = new [] { typeof(int) })] - int? Count { get; set; } - /// Whether to enable auto-scaler - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether to enable auto-scaler", - SerializedName = @"enableAutoScaling", - PossibleTypes = new [] { typeof(bool) })] - bool? EnableAutoScaling { get; set; } - /// Enable public IP for nodes - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Enable public IP for nodes", - SerializedName = @"enableNodePublicIP", - PossibleTypes = new [] { typeof(bool) })] - bool? EnableNodePublicIP { get; set; } - /// Maximum number of nodes for auto-scaling - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Maximum number of nodes for auto-scaling", - SerializedName = @"maxCount", - PossibleTypes = new [] { typeof(int) })] - int? MaxCount { get; set; } - /// Maximum number of pods that can run on a node. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Maximum number of pods that can run on a node.", - SerializedName = @"maxPods", - PossibleTypes = new [] { typeof(int) })] - int? MaxPod { get; set; } - /// Minimum number of nodes for auto-scaling - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Minimum number of nodes for auto-scaling", - SerializedName = @"minCount", - PossibleTypes = new [] { typeof(int) })] - int? MinCount { get; set; } - /// AgentPoolMode represents mode of an agent pool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"AgentPoolMode represents mode of an agent pool", - SerializedName = @"mode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get; set; } - /// Version of node image - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Version of node image", - SerializedName = @"nodeImageVersion", - PossibleTypes = new [] { typeof(string) })] - string NodeImageVersion { get; } - /// Agent pool node labels to be persisted across all nodes in agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Agent pool node labels to be persisted across all nodes in agent pool.", - SerializedName = @"nodeLabels", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } - /// - /// Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.", - SerializedName = @"nodeTaints", - PossibleTypes = new [] { typeof(string) })] - string[] NodeTaint { get; set; } - /// - /// OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, - /// it will apply the default osDisk size according to the vmSize specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.", - SerializedName = @"osDiskSizeGB", - PossibleTypes = new [] { typeof(int) })] - int? OSDiskSizeGb { get; set; } - /// - /// OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to - /// 'Managed'. May not be changed after creation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. May not be changed after creation.", - SerializedName = @"osDiskType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.", - SerializedName = @"osType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get; set; } - /// Version of orchestrator specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Version of orchestrator specified when creating the managed cluster.", - SerializedName = @"orchestratorVersion", - PossibleTypes = new [] { typeof(string) })] - string OrchestratorVersion { get; set; } - /// Tells whether the cluster is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Tells whether the cluster is Running or Stopped", - SerializedName = @"code", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } - /// AgentPoolType represents types of an agent pool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"AgentPoolType represents types of an agent pool", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? PropertiesType { get; set; } - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current deployment or provisioning state, which only appears in the response.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } - /// The ID for Proximity Placement Group. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The ID for Proximity Placement Group.", - SerializedName = @"proximityPlacementGroupID", - PossibleTypes = new [] { typeof(string) })] - string ProximityPlacementGroupId { get; set; } - /// - /// ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete.", - SerializedName = @"scaleSetEvictionPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get; set; } - /// - /// ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular.", - SerializedName = @"scaleSetPriority", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? ScaleSetPriority { get; set; } - /// - /// SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal - /// value greater than zero or -1 which indicates default price to be up-to on-demand. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand.", - SerializedName = @"spotMaxPrice", - PossibleTypes = new [] { typeof(float) })] - float? SpotMaxPrice { get; set; } - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Agent pool tags to be persisted on the agent pool virtual machine scale set.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags Tag { get; set; } - /// - /// Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default", - SerializedName = @"maxSurge", - PossibleTypes = new [] { typeof(string) })] - string UpgradeSettingMaxSurge { get; set; } - /// Size of agent VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Size of agent VMs.", - SerializedName = @"vmSize", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes? VMSize { get; set; } - /// VNet SubnetID specifies the VNet's subnet identifier. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"VNet SubnetID specifies the VNet's subnet identifier.", - SerializedName = @"vnetSubnetID", - PossibleTypes = new [] { typeof(string) })] - string VnetSubnetId { get; set; } - - } - /// Agent Pool. - internal partial interface IAgentPoolInternal : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal - { - /// Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. - string[] AvailabilityZone { get; set; } - /// - /// Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user - /// pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. - /// - int? Count { get; set; } - /// Whether to enable auto-scaler - bool? EnableAutoScaling { get; set; } - /// Enable public IP for nodes - bool? EnableNodePublicIP { get; set; } - /// Maximum number of nodes for auto-scaling - int? MaxCount { get; set; } - /// Maximum number of pods that can run on a node. - int? MaxPod { get; set; } - /// Minimum number of nodes for auto-scaling - int? MinCount { get; set; } - /// AgentPoolMode represents mode of an agent pool - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get; set; } - /// Version of node image - string NodeImageVersion { get; set; } - /// Agent pool node labels to be persisted across all nodes in agent pool. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } - /// - /// Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - /// - string[] NodeTaint { get; set; } - /// - /// OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, - /// it will apply the default osDisk size according to the vmSize specified. - /// - int? OSDiskSizeGb { get; set; } - /// - /// OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to - /// 'Managed'. May not be changed after creation. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get; set; } - /// Version of orchestrator specified when creating the managed cluster. - string OrchestratorVersion { get; set; } - /// Describes whether the Agent Pool is Running or Stopped - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState PowerState { get; set; } - /// Tells whether the cluster is Running or Stopped - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } - /// AgentPoolType represents types of an agent pool - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? PropertiesType { get; set; } - /// Properties of an agent pool. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties Property { get; set; } - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - string ProvisioningState { get; set; } - /// The ID for Proximity Placement Group. - string ProximityPlacementGroupId { get; set; } - /// - /// ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get; set; } - /// - /// ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? ScaleSetPriority { get; set; } - /// - /// SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal - /// value greater than zero or -1 which indicates default price to be up-to on-demand. - /// - float? SpotMaxPrice { get; set; } - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags Tag { get; set; } - /// Settings for upgrading the agentpool - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings UpgradeSetting { get; set; } - /// - /// Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - /// - string UpgradeSettingMaxSurge { get; set; } - /// Size of agent VMs. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes? VMSize { get; set; } - /// VNet SubnetID specifies the VNet's subnet identifier. - string VnetSubnetId { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.cs deleted file mode 100644 index 457496ccbad0..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.cs +++ /dev/null @@ -1,57 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Settings for upgrading an agentpool - public partial class AgentPoolUpgradeSettings : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettingsInternal - { - - /// Backing field for property. - private string _maxSurge; - - /// - /// Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string MaxSurge { get => this._maxSurge; set => this._maxSurge = value; } - - /// Creates an new instance. - public AgentPoolUpgradeSettings() - { - - } - } - /// Settings for upgrading an agentpool - public partial interface IAgentPoolUpgradeSettings : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// - /// Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default", - SerializedName = @"maxSurge", - PossibleTypes = new [] { typeof(string) })] - string MaxSurge { get; set; } - - } - /// Settings for upgrading an agentpool - internal partial interface IAgentPoolUpgradeSettingsInternal - - { - /// - /// Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - /// - string MaxSurge { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.PowerShell.cs deleted file mode 100644 index 560e2c2b84ed..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.PowerShell.cs +++ /dev/null @@ -1,774 +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.Api20200901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - - [System.ComponentModel.TypeConverter(typeof(BaseManagedClusterTypeConverter))] - public partial class BaseManagedCluster - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal BaseManagedCluster(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.Api20200901.IBaseManagedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile) content.GetValueForProperty("LinuxProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfileTypeConverter.ConvertFrom); - } - if (content.Contains("WindowsProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ServicePrincipalProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile) content.GetValueForProperty("ServicePrincipalProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AadProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AutoScalerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ApiServerAccessProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile) content.GetValueForProperty("ApiServerAccessProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("MaxAgentPool")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).MaxAgentPool = (int?) content.GetValueForProperty("MaxAgentPool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).MaxAgentPool, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KubernetesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString); - } - if (content.Contains("DnsPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DnsPrefix, global::System.Convert.ToString); - } - if (content.Contains("Fqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Fqdn, global::System.Convert.ToString); - } - if (content.Contains("PrivateFqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PrivateFqdn = (string) content.GetValueForProperty("PrivateFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PrivateFqdn, global::System.Convert.ToString); - } - if (content.Contains("AgentPoolProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileTypeConverter.ConvertFrom)); - } - if (content.Contains("AddonProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AddonProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles) content.GetValueForProperty("AddonProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AddonProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAddonProfilesTypeConverter.ConvertFrom); - } - if (content.Contains("NodeResourceGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NodeResourceGroup = (string) content.GetValueForProperty("NodeResourceGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NodeResourceGroup, global::System.Convert.ToString); - } - if (content.Contains("EnableRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnablePodSecurityPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DiskEncryptionSetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); - } - if (content.Contains("IdentityProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile) content.GetValueForProperty("IdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfileTypeConverter.ConvertFrom); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("WindowProfileLicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileLicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileLicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPlugin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin?) content.GetValueForProperty("NetworkProfileNetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy?) content.GetValueForProperty("NetworkProfileNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode?) content.GetValueForProperty("NetworkProfileNetworkMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode.CreateFrom); - } - if (content.Contains("NetworkProfileOutboundType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileOutboundType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType?) content.GetValueForProperty("NetworkProfileOutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileOutboundType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType.CreateFrom); - } - if (content.Contains("AutoScalerProfileExpander")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileExpander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileExpander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfileSsh")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileAdminUsername = (string) content.GetValueForProperty("LinuxProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminUsername = (string) content.GetValueForProperty("WindowProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminPassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminPassword = (string) content.GetValueForProperty("WindowProfileAdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminPassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileClientId = (string) content.GetValueForProperty("ServicePrincipalProfileClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileSecret = (string) content.GetValueForProperty("ServicePrincipalProfileSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileSecret, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("NetworkProfileLoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfilePodCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfilePodCidr = (string) content.GetValueForProperty("NetworkProfilePodCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfilePodCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileServiceCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileServiceCidr = (string) content.GetValueForProperty("NetworkProfileServiceCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileServiceCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDnsServiceIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDnsServiceIP = (string) content.GetValueForProperty("NetworkProfileDnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDnsServiceIP, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDockerBridgeCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDockerBridgeCidr = (string) content.GetValueForProperty("NetworkProfileDockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDockerBridgeCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerSku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku?) content.GetValueForProperty("NetworkProfileLoadBalancerSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku.CreateFrom); - } - if (content.Contains("AadProfileManaged")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileManaged = (bool?) content.GetValueForProperty("AadProfileManaged",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileManaged, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileEnableAzureRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileAdminGroupObjectID")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("AadProfileClientAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileClientAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppSecret = (string) content.GetValueForProperty("AadProfileServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppSecret, global::System.Convert.ToString); - } - if (content.Contains("AadProfileTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxGracefulTerminationSec")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec = (string) content.GetValueForProperty("AutoScalerProfileMaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxTotalUnreadyPercentage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage = (string) content.GetValueForProperty("AutoScalerProfileMaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileNewPodScaleUpDelay")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay = (string) content.GetValueForProperty("AutoScalerProfileNewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileOkTotalUnreadyCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount = (string) content.GetValueForProperty("AutoScalerProfileOkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScanInterval")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScanInterval = (string) content.GetValueForProperty("AutoScalerProfileScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScanInterval, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterAdd")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterFailure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnneededTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnreadyTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUtilizationThreshold")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithLocalStorage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithSystemPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod, global::System.Convert.ToString); - } - if (content.Contains("ApiServerAccessProfileAuthorizedIPRange")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange = (string[]) content.GetValueForProperty("ApiServerAccessProfileAuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ApiServerAccessProfileEnablePrivateCluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SshPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileManagedOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIPPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("LoadBalancerProfileOutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("LoadBalancerProfileOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileEffectiveOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("LoadBalancerProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileAllocatedOutboundPort")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileAllocatedOutboundPort = (int?) content.GetValueForProperty("LoadBalancerProfileAllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileAllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LoadBalancerProfileIdleTimeoutInMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("LoadBalancerProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ManagedOutboundIPCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OutboundIPPrefixPublicIpprefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("OutboundIPPublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal BaseManagedCluster(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.Api20200901.IBaseManagedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile) content.GetValueForProperty("LinuxProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfileTypeConverter.ConvertFrom); - } - if (content.Contains("WindowsProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ServicePrincipalProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile) content.GetValueForProperty("ServicePrincipalProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AadProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AutoScalerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ApiServerAccessProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile) content.GetValueForProperty("ApiServerAccessProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("MaxAgentPool")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).MaxAgentPool = (int?) content.GetValueForProperty("MaxAgentPool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).MaxAgentPool, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KubernetesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString); - } - if (content.Contains("DnsPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DnsPrefix, global::System.Convert.ToString); - } - if (content.Contains("Fqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Fqdn, global::System.Convert.ToString); - } - if (content.Contains("PrivateFqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PrivateFqdn = (string) content.GetValueForProperty("PrivateFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PrivateFqdn, global::System.Convert.ToString); - } - if (content.Contains("AgentPoolProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileTypeConverter.ConvertFrom)); - } - if (content.Contains("AddonProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AddonProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles) content.GetValueForProperty("AddonProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AddonProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAddonProfilesTypeConverter.ConvertFrom); - } - if (content.Contains("NodeResourceGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NodeResourceGroup = (string) content.GetValueForProperty("NodeResourceGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NodeResourceGroup, global::System.Convert.ToString); - } - if (content.Contains("EnableRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnablePodSecurityPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DiskEncryptionSetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); - } - if (content.Contains("IdentityProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile) content.GetValueForProperty("IdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfileTypeConverter.ConvertFrom); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("WindowProfileLicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileLicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileLicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPlugin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin?) content.GetValueForProperty("NetworkProfileNetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy?) content.GetValueForProperty("NetworkProfileNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode?) content.GetValueForProperty("NetworkProfileNetworkMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode.CreateFrom); - } - if (content.Contains("NetworkProfileOutboundType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileOutboundType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType?) content.GetValueForProperty("NetworkProfileOutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileOutboundType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType.CreateFrom); - } - if (content.Contains("AutoScalerProfileExpander")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileExpander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileExpander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfileSsh")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileAdminUsername = (string) content.GetValueForProperty("LinuxProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminUsername = (string) content.GetValueForProperty("WindowProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminPassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminPassword = (string) content.GetValueForProperty("WindowProfileAdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminPassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileClientId = (string) content.GetValueForProperty("ServicePrincipalProfileClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileSecret = (string) content.GetValueForProperty("ServicePrincipalProfileSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileSecret, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("NetworkProfileLoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfilePodCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfilePodCidr = (string) content.GetValueForProperty("NetworkProfilePodCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfilePodCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileServiceCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileServiceCidr = (string) content.GetValueForProperty("NetworkProfileServiceCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileServiceCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDnsServiceIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDnsServiceIP = (string) content.GetValueForProperty("NetworkProfileDnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDnsServiceIP, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDockerBridgeCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDockerBridgeCidr = (string) content.GetValueForProperty("NetworkProfileDockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDockerBridgeCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerSku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku?) content.GetValueForProperty("NetworkProfileLoadBalancerSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku.CreateFrom); - } - if (content.Contains("AadProfileManaged")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileManaged = (bool?) content.GetValueForProperty("AadProfileManaged",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileManaged, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileEnableAzureRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileAdminGroupObjectID")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("AadProfileClientAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileClientAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppSecret = (string) content.GetValueForProperty("AadProfileServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppSecret, global::System.Convert.ToString); - } - if (content.Contains("AadProfileTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxGracefulTerminationSec")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec = (string) content.GetValueForProperty("AutoScalerProfileMaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxTotalUnreadyPercentage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage = (string) content.GetValueForProperty("AutoScalerProfileMaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileNewPodScaleUpDelay")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay = (string) content.GetValueForProperty("AutoScalerProfileNewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileOkTotalUnreadyCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount = (string) content.GetValueForProperty("AutoScalerProfileOkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScanInterval")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScanInterval = (string) content.GetValueForProperty("AutoScalerProfileScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScanInterval, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterAdd")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterFailure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnneededTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnreadyTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUtilizationThreshold")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithLocalStorage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithSystemPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod, global::System.Convert.ToString); - } - if (content.Contains("ApiServerAccessProfileAuthorizedIPRange")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange = (string[]) content.GetValueForProperty("ApiServerAccessProfileAuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ApiServerAccessProfileEnablePrivateCluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SshPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileManagedOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIPPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("LoadBalancerProfileOutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("LoadBalancerProfileOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileEffectiveOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("LoadBalancerProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileAllocatedOutboundPort")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileAllocatedOutboundPort = (int?) content.GetValueForProperty("LoadBalancerProfileAllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileAllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LoadBalancerProfileIdleTimeoutInMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("LoadBalancerProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ManagedOutboundIPCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OutboundIPPrefixPublicIpprefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("OutboundIPPublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.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.Api20200901.IBaseManagedCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new BaseManagedCluster(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.Api20200901.IBaseManagedCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new BaseManagedCluster(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.Api20200901.IBaseManagedCluster 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(); - } - [System.ComponentModel.TypeConverter(typeof(BaseManagedClusterTypeConverter))] - public partial interface IBaseManagedCluster - - { - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.cs deleted file mode 100644 index af2d9ebf5a7d..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.cs +++ /dev/null @@ -1,1181 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - public partial class BaseManagedCluster : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedCluster, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal - { - - /// AAD group object IDs that will have admin role of the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string[] AadProfileAdminGroupObjectID { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileAdminGroupObjectID; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileAdminGroupObjectID = value ?? null /* arrayOf */; } - - /// The client AAD application ID. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AadProfileClientAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileClientAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileClientAppId = value ?? null; } - - /// Whether to enable Azure RBAC for Kubernetes authorization. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool? AadProfileEnableAzureRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileEnableAzureRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileEnableAzureRbac = value ?? default(bool); } - - /// Whether to enable managed AAD. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool? AadProfileManaged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileManaged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileManaged = value ?? default(bool); } - - /// The server AAD application ID. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AadProfileServerAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileServerAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileServerAppId = value ?? null; } - - /// The server AAD application secret. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AadProfileServerAppSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileServerAppSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileServerAppSecret = value ?? null; } - - /// - /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfileTenantId = value ?? null; } - - /// Profile of managed cluster add-on. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles AddonProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AddonProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AddonProfile = value ?? null /* model class */; } - - /// Properties of the agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AgentPoolProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AgentPoolProfile = value ?? null /* arrayOf */; } - - /// Authorized IP Ranges to kubernetes API server. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string[] ApiServerAccessProfileAuthorizedIPRange { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileAuthorizedIPRange; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileAuthorizedIPRange = value ?? null /* arrayOf */; } - - /// Whether to create the cluster as a private cluster or not. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool? ApiServerAccessProfileEnablePrivateCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnablePrivateCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnablePrivateCluster = value ?? default(bool); } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileBalanceSimilarNodeGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileBalanceSimilarNodeGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileBalanceSimilarNodeGroup = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileExpander; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileExpander = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander)""); } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileMaxEmptyBulkDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxEmptyBulkDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxEmptyBulkDelete = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileMaxGracefulTerminationSec { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxGracefulTerminationSec; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxGracefulTerminationSec = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileMaxTotalUnreadyPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxTotalUnreadyPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxTotalUnreadyPercentage = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileNewPodScaleUpDelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileNewPodScaleUpDelay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileNewPodScaleUpDelay = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileOkTotalUnreadyCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileOkTotalUnreadyCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileOkTotalUnreadyCount = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownDelayAfterAdd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterAdd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterAdd = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownDelayAfterDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterDelete = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownDelayAfterFailure { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterFailure; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterFailure = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownUnneededTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnneededTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnneededTime = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownUnreadyTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnreadyTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnreadyTime = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownUtilizationThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUtilizationThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUtilizationThreshold = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScanInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScanInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScanInterval = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileSkipNodesWithLocalStorage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithLocalStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithLocalStorage = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileSkipNodesWithSystemPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithSystemPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithSystemPod = value ?? null; } - - /// ResourceId of the disk encryption set to use for enabling encryption at rest. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string DiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).DiskEncryptionSetId = value ?? null; } - - /// DNS prefix specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string DnsPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).DnsPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).DnsPrefix = value ?? null; } - - /// - /// (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, - /// 2020. Learn more at aka.ms/aks/azpodpolicy. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool? EnablePodSecurityPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).EnablePodSecurityPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).EnablePodSecurityPolicy = value ?? default(bool); } - - /// Whether to enable Kubernetes Role-Based Access Control. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool? EnableRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).EnableRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).EnableRbac = value ?? default(bool); } - - /// FQDN for the master pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string Fqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).Fqdn; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity _identity; - - /// The identity of the managed cluster, if configured. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentity()); set => this._identity = value; } - - /// - /// 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.Api20200901.IManagedClusterIdentityInternal)Identity).PrincipalId; } - - /// Identities associated with the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile IdentityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).IdentityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).IdentityProfile = value ?? null /* model class */; } - - /// - /// The tenant 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 IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)Identity).TenantId; } - - /// - /// The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master - /// components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI - /// for the managed cluster, service principal will be used instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType)""); } - - /// - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will 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.Api20200901.IManagedClusterIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } - - /// Version of Kubernetes specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).KubernetesVersion = value ?? null; } - - /// The administrator username to use for Linux VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string LinuxProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LinuxProfileAdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LinuxProfileAdminUsername = value ?? null; } - - /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? LoadBalancerProfileAllocatedOutboundPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileAllocatedOutboundPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileAllocatedOutboundPort = value ?? default(int); } - - /// The effective outbound IP resources of the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileEffectiveOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileEffectiveOutboundIP = value ?? null /* arrayOf */; } - - /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? LoadBalancerProfileIdleTimeoutInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileIdleTimeoutInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileIdleTimeoutInMinute = value ?? default(int); } - - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? ManagedOutboundIPCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ManagedOutboundIPCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ManagedOutboundIPCount = value ?? default(int); } - - /// The max number of agent pools for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? MaxAgentPool { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).MaxAgentPool; } - - /// Internal Acessors for AadProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.AadProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AadProfile = value; } - - /// Internal Acessors for ApiServerAccessProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.ApiServerAccessProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfile = value; } - - /// Internal Acessors for AutoScalerProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.AutoScalerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).AutoScalerProfile = value; } - - /// Internal Acessors for Fqdn - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.Fqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).Fqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).Fqdn = value; } - - /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentity()); set { {_identity = value;} } } - - /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)Identity).PrincipalId = value; } - - /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)Identity).TenantId = value; } - - /// Internal Acessors for LinuxProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.LinuxProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LinuxProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LinuxProfile = value; } - - /// Internal Acessors for LinuxProfileSsh - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.LinuxProfileSsh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LinuxProfileSsh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LinuxProfileSsh = value; } - - /// Internal Acessors for LoadBalancerProfileManagedOutboundIP - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.LoadBalancerProfileManagedOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileManagedOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileManagedOutboundIP = value; } - - /// Internal Acessors for LoadBalancerProfileOutboundIP - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.LoadBalancerProfileOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileOutboundIP = value; } - - /// Internal Acessors for LoadBalancerProfileOutboundIPPrefix - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.LoadBalancerProfileOutboundIPPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileOutboundIPPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).LoadBalancerProfileOutboundIPPrefix = value; } - - /// Internal Acessors for MaxAgentPool - int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.MaxAgentPool { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).MaxAgentPool; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).MaxAgentPool = value; } - - /// Internal Acessors for NetworkProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.NetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfile = value; } - - /// Internal Acessors for NetworkProfileLoadBalancerProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.NetworkProfileLoadBalancerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileLoadBalancerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileLoadBalancerProfile = value; } - - /// Internal Acessors for PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).PowerState = value; } - - /// Internal Acessors for PrivateFqdn - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.PrivateFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).PrivateFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).PrivateFqdn = value; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterProperties()); set { {_property = value;} } } - - /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ProvisioningState = value; } - - /// Internal Acessors for ServicePrincipalProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.ServicePrincipalProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfile = value; } - - /// Internal Acessors for WindowsProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.WindowsProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).WindowsProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).WindowsProfile = value; } - - /// - /// 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.Inlined)] - public string NetworkProfileDnsServiceIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileDnsServiceIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileDnsServiceIP = value ?? null; } - - /// - /// 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string NetworkProfileDockerBridgeCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileDockerBridgeCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileDockerBridgeCidr = value ?? null; } - - /// The load balancer sku for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? NetworkProfileLoadBalancerSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileLoadBalancerSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileLoadBalancerSku = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku)""); } - - /// Network mode used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkProfileNetworkMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileNetworkMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileNetworkMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode)""); } - - /// Network plugin used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkProfileNetworkPlugin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileNetworkPlugin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileNetworkPlugin = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin)""); } - - /// Network policy used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkProfileNetworkPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileNetworkPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileNetworkPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy)""); } - - /// The outbound (egress) routing method. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? NetworkProfileOutboundType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileOutboundType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileOutboundType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType)""); } - - /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string NetworkProfilePodCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfilePodCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfilePodCidr = value ?? null; } - - /// - /// 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.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string NetworkProfileServiceCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileServiceCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NetworkProfileServiceCidr = value ?? null; } - - /// 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.Api20200901.IManagedClusterPropertiesInternal)Property).NodeResourceGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).NodeResourceGroup = value ?? null; } - - /// A list of public IP prefix resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).OutboundIPPrefixPublicIpprefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).OutboundIPPrefixPublicIpprefix = value ?? null /* arrayOf */; } - - /// A list of public IP resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).OutboundIPPublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).OutboundIPPublicIP = value ?? null /* arrayOf */; } - - /// Tells whether the cluster is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).PowerStateCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).PowerStateCode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } - - /// FQDN of private cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string PrivateFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).PrivateFqdn; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties _property; - - /// Properties of a managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterProperties()); set => this._property = value; } - - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ProvisioningState; } - - /// 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.Api20200901.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfileClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfileClientId = value ?? null; } - - /// The secret password associated with the service principal in plain text. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string ServicePrincipalProfileSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfileSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfileSecret = value ?? null; } - - /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).SshPublicKey = value ?? null /* arrayOf */; } - - /// - /// 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:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string WindowProfileAdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).WindowProfileAdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).WindowProfileAdminPassword = value ?? null; } - - /// - /// Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string WindowProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).WindowProfileAdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).WindowProfileAdminUsername = value ?? null; } - - /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).WindowProfileLicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)Property).WindowProfileLicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType)""); } - - /// Creates an new instance. - public BaseManagedCluster() - { - - } - } - public partial interface IBaseManagedCluster : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// AAD group object IDs that will have admin role of the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"AAD group object IDs that will have admin role of the cluster.", - SerializedName = @"adminGroupObjectIDs", - PossibleTypes = new [] { typeof(string) })] - string[] AadProfileAdminGroupObjectID { get; set; } - /// The client AAD application ID. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The client AAD application ID.", - SerializedName = @"clientAppID", - PossibleTypes = new [] { typeof(string) })] - string AadProfileClientAppId { get; set; } - /// Whether to enable Azure RBAC for Kubernetes authorization. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether to enable Azure RBAC for Kubernetes authorization.", - SerializedName = @"enableAzureRBAC", - PossibleTypes = new [] { typeof(bool) })] - bool? AadProfileEnableAzureRbac { get; set; } - /// Whether to enable managed AAD. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether to enable managed AAD.", - SerializedName = @"managed", - PossibleTypes = new [] { typeof(bool) })] - bool? AadProfileManaged { get; set; } - /// The server AAD application ID. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The server AAD application ID.", - SerializedName = @"serverAppID", - PossibleTypes = new [] { typeof(string) })] - string AadProfileServerAppId { get; set; } - /// The server AAD application secret. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The server AAD application secret.", - SerializedName = @"serverAppSecret", - PossibleTypes = new [] { typeof(string) })] - string AadProfileServerAppSecret { get; set; } - /// - /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.", - SerializedName = @"tenantID", - PossibleTypes = new [] { typeof(string) })] - string AadProfileTenantId { get; set; } - /// Profile of managed cluster add-on. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Profile of managed cluster add-on.", - SerializedName = @"addonProfiles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles AddonProfile { get; set; } - /// Properties of the agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Properties of the agent pool.", - SerializedName = @"agentPoolProfiles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get; set; } - /// Authorized IP Ranges to kubernetes API server. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authorized IP Ranges to kubernetes API server.", - SerializedName = @"authorizedIPRanges", - PossibleTypes = new [] { typeof(string) })] - string[] ApiServerAccessProfileAuthorizedIPRange { get; set; } - /// Whether to create the cluster as a private cluster or not. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether to create the cluster as a private cluster or not.", - SerializedName = @"enablePrivateCluster", - PossibleTypes = new [] { typeof(bool) })] - bool? ApiServerAccessProfileEnablePrivateCluster { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"balance-similar-node-groups", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileBalanceSimilarNodeGroup { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"expander", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"max-empty-bulk-delete", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileMaxEmptyBulkDelete { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"max-graceful-termination-sec", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileMaxGracefulTerminationSec { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"max-total-unready-percentage", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileMaxTotalUnreadyPercentage { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"new-pod-scale-up-delay", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileNewPodScaleUpDelay { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"ok-total-unready-count", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileOkTotalUnreadyCount { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-delay-after-add", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownDelayAfterAdd { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-delay-after-delete", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownDelayAfterDelete { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-delay-after-failure", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownDelayAfterFailure { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-unneeded-time", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownUnneededTime { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-unready-time", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownUnreadyTime { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-utilization-threshold", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownUtilizationThreshold { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scan-interval", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScanInterval { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"skip-nodes-with-local-storage", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileSkipNodesWithLocalStorage { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"skip-nodes-with-system-pods", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileSkipNodesWithSystemPod { get; set; } - /// ResourceId of the disk encryption set to use for enabling encryption at rest. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"ResourceId of the disk encryption set to use for enabling encryption at rest.", - SerializedName = @"diskEncryptionSetID", - PossibleTypes = new [] { typeof(string) })] - string DiskEncryptionSetId { get; set; } - /// DNS prefix specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"DNS prefix specified when creating the managed cluster.", - SerializedName = @"dnsPrefix", - PossibleTypes = new [] { typeof(string) })] - string DnsPrefix { get; set; } - /// - /// (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, - /// 2020. Learn more at aka.ms/aks/azpodpolicy. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"(DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy.", - 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, - ReadOnly = false, - Description = @"Whether to enable Kubernetes Role-Based Access Control.", - SerializedName = @"enableRBAC", - PossibleTypes = new [] { typeof(bool) })] - bool? EnableRbac { get; set; } - /// FQDN for the master pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"FQDN for the master pool.", - SerializedName = @"fqdn", - PossibleTypes = new [] { typeof(string) })] - string Fqdn { get; } - /// - /// The principal id of the system assigned identity which is used by master components. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The principal id of the system assigned identity which is used by master components.", - SerializedName = @"principalId", - PossibleTypes = new [] { typeof(string) })] - string IdentityPrincipalId { get; } - /// Identities associated with the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Identities associated with the cluster.", - SerializedName = @"identityProfile", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } - /// - /// The tenant id of the system assigned identity which is used by master components. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The tenant id of the system assigned identity which is used by master components.", - SerializedName = @"tenantId", - PossibleTypes = new [] { typeof(string) })] - string IdentityTenantId { get; } - /// - /// The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master - /// components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI - /// for the managed cluster, service principal will be used instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service principal will be used instead.", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? IdentityType { get; set; } - /// - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will 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, - ReadOnly = false, - Description = @"The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned identity is allowed. The user identity dictionary key references will 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.Api20200901.IManagedClusterIdentityUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// Version of Kubernetes specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Version of Kubernetes specified when creating the managed cluster.", - SerializedName = @"kubernetesVersion", - PossibleTypes = new [] { typeof(string) })] - string KubernetesVersion { get; set; } - /// The administrator username to use for Linux VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The administrator username to use for Linux VMs.", - SerializedName = @"adminUsername", - PossibleTypes = new [] { typeof(string) })] - string LinuxProfileAdminUsername { get; set; } - /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports.", - SerializedName = @"allocatedOutboundPorts", - PossibleTypes = new [] { typeof(int) })] - int? LoadBalancerProfileAllocatedOutboundPort { get; set; } - /// The effective outbound IP resources of the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The effective outbound IP resources of the cluster load balancer.", - SerializedName = @"effectiveOutboundIPs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get; set; } - /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes.", - SerializedName = @"idleTimeoutInMinutes", - PossibleTypes = new [] { typeof(int) })] - int? LoadBalancerProfileIdleTimeoutInMinute { get; set; } - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ", - SerializedName = @"count", - PossibleTypes = new [] { typeof(int) })] - int? ManagedOutboundIPCount { get; set; } - /// The max number of agent pools for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The max number of agent pools for the managed cluster.", - SerializedName = @"maxAgentPools", - PossibleTypes = new [] { typeof(int) })] - int? MaxAgentPool { get; } - /// - /// 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, - ReadOnly = false, - 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 NetworkProfileDnsServiceIP { 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - 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", - PossibleTypes = new [] { typeof(string) })] - string NetworkProfileDockerBridgeCidr { get; set; } - /// The load balancer sku for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The load balancer sku for the managed cluster.", - SerializedName = @"loadBalancerSku", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? NetworkProfileLoadBalancerSku { get; set; } - /// Network mode used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Network mode used for building Kubernetes network.", - SerializedName = @"networkMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkProfileNetworkMode { get; set; } - /// Network plugin used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Network plugin used for building Kubernetes network.", - SerializedName = @"networkPlugin", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkProfileNetworkPlugin { get; set; } - /// Network policy used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Network policy used for building Kubernetes network.", - SerializedName = @"networkPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkProfileNetworkPolicy { get; set; } - /// The outbound (egress) routing method. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The outbound (egress) routing method.", - SerializedName = @"outboundType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? NetworkProfileOutboundType { get; set; } - /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A CIDR notation IP range from which to assign pod IPs when kubenet is used.", - SerializedName = @"podCidr", - PossibleTypes = new [] { typeof(string) })] - string NetworkProfilePodCidr { 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( - Required = false, - ReadOnly = false, - Description = @"A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.", - SerializedName = @"serviceCidr", - PossibleTypes = new [] { typeof(string) })] - string NetworkProfileServiceCidr { get; set; } - /// Name of the resource group containing agent pool nodes. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of the resource group containing agent pool nodes.", - SerializedName = @"nodeResourceGroup", - PossibleTypes = new [] { typeof(string) })] - string NodeResourceGroup { get; set; } - /// A list of public IP prefix resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of public IP prefix resources.", - SerializedName = @"publicIPPrefixes", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } - /// A list of public IP resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of public IP resources.", - SerializedName = @"publicIPs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get; set; } - /// Tells whether the cluster is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Tells whether the cluster is Running or Stopped", - SerializedName = @"code", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } - /// FQDN of private cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"FQDN of private cluster.", - SerializedName = @"privateFQDN", - PossibleTypes = new [] { typeof(string) })] - string PrivateFqdn { get; } - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current deployment or provisioning state, which only appears in the response.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } - /// The ID for the service principal. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The ID for the service principal.", - SerializedName = @"clientId", - PossibleTypes = new [] { typeof(string) })] - string ServicePrincipalProfileClientId { get; set; } - /// The secret password associated with the service principal in plain text. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The secret password associated with the service principal in plain text.", - SerializedName = @"secret", - PossibleTypes = new [] { typeof(string) })] - string ServicePrincipalProfileSecret { get; set; } - /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified.", - SerializedName = @"publicKeys", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] SshPublicKey { 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:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"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:** ""abc@123"", ""P@$$w0rd"", ""P@ssw0rd"", ""P@ssword123"", ""Pa$$word"", ""pass@word1"", ""Password!"", ""Password1"", ""Password22"", ""iloveyou!""", - SerializedName = @"adminPassword", - PossibleTypes = new [] { typeof(string) })] - string WindowProfileAdminPassword { get; set; } - /// - /// Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the name of the administrator account.

**restriction:** Cannot end in "".""

**Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

**Minimum-length:** 1 character

**Max-length:** 20 characters", - SerializedName = @"adminUsername", - PossibleTypes = new [] { typeof(string) })] - string WindowProfileAdminUsername { get; set; } - /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs.", - SerializedName = @"licenseType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get; set; } - - } - internal partial interface IBaseManagedClusterInternal - - { - /// Profile of Azure Active Directory configuration. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile AadProfile { get; set; } - /// AAD group object IDs that will have admin role of the cluster. - string[] AadProfileAdminGroupObjectID { get; set; } - /// The client AAD application ID. - string AadProfileClientAppId { get; set; } - /// Whether to enable Azure RBAC for Kubernetes authorization. - bool? AadProfileEnableAzureRbac { get; set; } - /// Whether to enable managed AAD. - bool? AadProfileManaged { get; set; } - /// The server AAD application ID. - string AadProfileServerAppId { get; set; } - /// The server AAD application secret. - string AadProfileServerAppSecret { get; set; } - /// - /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. - /// - string AadProfileTenantId { get; set; } - /// Profile of managed cluster add-on. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles AddonProfile { get; set; } - /// Properties of the agent pool. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get; set; } - /// Access profile for managed cluster API server. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile ApiServerAccessProfile { get; set; } - /// Authorized IP Ranges to kubernetes API server. - string[] ApiServerAccessProfileAuthorizedIPRange { get; set; } - /// Whether to create the cluster as a private cluster or not. - bool? ApiServerAccessProfileEnablePrivateCluster { get; set; } - /// Parameters to be applied to the cluster-autoscaler when enabled - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get; set; } - - string AutoScalerProfileBalanceSimilarNodeGroup { get; set; } - - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get; set; } - - string AutoScalerProfileMaxEmptyBulkDelete { get; set; } - - string AutoScalerProfileMaxGracefulTerminationSec { get; set; } - - string AutoScalerProfileMaxTotalUnreadyPercentage { get; set; } - - string AutoScalerProfileNewPodScaleUpDelay { get; set; } - - string AutoScalerProfileOkTotalUnreadyCount { get; set; } - - string AutoScalerProfileScaleDownDelayAfterAdd { get; set; } - - string AutoScalerProfileScaleDownDelayAfterDelete { get; set; } - - string AutoScalerProfileScaleDownDelayAfterFailure { get; set; } - - string AutoScalerProfileScaleDownUnneededTime { get; set; } - - string AutoScalerProfileScaleDownUnreadyTime { get; set; } - - string AutoScalerProfileScaleDownUtilizationThreshold { get; set; } - - string AutoScalerProfileScanInterval { get; set; } - - string AutoScalerProfileSkipNodesWithLocalStorage { get; set; } - - string AutoScalerProfileSkipNodesWithSystemPod { get; set; } - /// ResourceId of the disk encryption set to use for enabling encryption at rest. - string DiskEncryptionSetId { get; set; } - /// DNS prefix specified when creating the managed cluster. - string DnsPrefix { get; set; } - /// - /// (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, - /// 2020. Learn more at aka.ms/aks/azpodpolicy. - /// - bool? EnablePodSecurityPolicy { get; set; } - /// Whether to enable Kubernetes Role-Based Access Control. - bool? EnableRbac { get; set; } - /// FQDN for the master pool. - string Fqdn { get; set; } - /// The identity of the managed cluster, if configured. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity Identity { 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. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } - /// - /// The tenant id of the system assigned identity which is used by master components. - /// - string IdentityTenantId { get; set; } - /// - /// The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master - /// components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI - /// for the managed cluster, service principal will be used instead. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? IdentityType { get; set; } - /// - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } - /// Version of Kubernetes specified when creating the managed cluster. - string KubernetesVersion { get; set; } - /// Profile for Linux VMs in the container service cluster. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile LinuxProfile { get; set; } - /// The administrator username to use for Linux VMs. - string LinuxProfileAdminUsername { get; set; } - /// SSH configuration for Linux-based VMs running on Azure. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration LinuxProfileSsh { get; set; } - /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. - /// - int? LoadBalancerProfileAllocatedOutboundPort { get; set; } - /// The effective outbound IP resources of the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get; set; } - /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. - /// - int? LoadBalancerProfileIdleTimeoutInMinute { get; set; } - /// Desired managed outbound IPs for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs LoadBalancerProfileManagedOutboundIP { get; set; } - /// Desired outbound IP resources for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs LoadBalancerProfileOutboundIP { get; set; } - /// Desired outbound IP Prefix resources for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes LoadBalancerProfileOutboundIPPrefix { get; set; } - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - int? ManagedOutboundIPCount { get; set; } - /// The max number of agent pools for the managed cluster. - int? MaxAgentPool { get; set; } - /// Profile of network configuration. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile NetworkProfile { get; set; } - /// - /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified - /// in serviceCidr. - /// - string NetworkProfileDnsServiceIP { 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 NetworkProfileDockerBridgeCidr { get; set; } - /// Profile of the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile NetworkProfileLoadBalancerProfile { get; set; } - /// The load balancer sku for the managed cluster. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? NetworkProfileLoadBalancerSku { get; set; } - /// Network mode used for building Kubernetes network. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkProfileNetworkMode { get; set; } - /// Network plugin used for building Kubernetes network. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkProfileNetworkPlugin { get; set; } - /// Network policy used for building Kubernetes network. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkProfileNetworkPolicy { get; set; } - /// The outbound (egress) routing method. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? NetworkProfileOutboundType { get; set; } - /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. - string NetworkProfilePodCidr { get; set; } - /// - /// A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. - /// - string NetworkProfileServiceCidr { get; set; } - /// Name of the resource group containing agent pool nodes. - string NodeResourceGroup { get; set; } - /// A list of public IP prefix resources. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } - /// A list of public IP resources. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get; set; } - /// Represents the Power State of the cluster - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState PowerState { get; set; } - /// Tells whether the cluster is Running or Stopped - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } - /// FQDN of private cluster. - string PrivateFqdn { get; set; } - /// Properties of a managed cluster. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties Property { get; set; } - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - string ProvisioningState { get; set; } - /// - /// Information about a service principal identity for the cluster to use for manipulating Azure APIs. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile ServicePrincipalProfile { get; set; } - /// The ID for the service principal. - string ServicePrincipalProfileClientId { get; set; } - /// The secret password associated with the service principal in plain text. - string ServicePrincipalProfileSecret { get; set; } - /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] SshPublicKey { 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:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - ///
- string WindowProfileAdminPassword { get; set; } - /// - /// Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters - ///
- string WindowProfileAdminUsername { get; set; } - /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get; set; } - /// Profile for Windows VMs in the container service cluster. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile WindowsProfile { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.cs deleted file mode 100644 index 0e6a723a9bb0..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.cs +++ /dev/null @@ -1,77 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Profile for diagnostics on the container service cluster. - public partial class ContainerServiceDiagnosticsProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal - { - - /// Internal Acessors for VMDiagnostic - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal.VMDiagnostic { get => (this._vMDiagnostic = this._vMDiagnostic ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceVMDiagnostics()); set { {_vMDiagnostic = value;} } } - - /// Internal Acessors for VMDiagnosticStorageUri - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal.VMDiagnosticStorageUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)VMDiagnostic).StorageUri; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)VMDiagnostic).StorageUri = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics _vMDiagnostic; - - /// Profile for diagnostics on the container service VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics VMDiagnostic { get => (this._vMDiagnostic = this._vMDiagnostic ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceVMDiagnostics()); set => this._vMDiagnostic = value; } - - /// Whether the VM diagnostic agent is provisioned on the VM. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool VMDiagnosticEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)VMDiagnostic).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)VMDiagnostic).Enabled = value ; } - - /// The URI of the storage account where diagnostics are stored. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string VMDiagnosticStorageUri { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)VMDiagnostic).StorageUri; } - - /// Creates an new instance. - public ContainerServiceDiagnosticsProfile() - { - - } - } - /// Profile for diagnostics on the container service cluster. - public partial interface IContainerServiceDiagnosticsProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// Whether the VM diagnostic agent is provisioned on the VM. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Whether the VM diagnostic agent is provisioned on the VM.", - SerializedName = @"enabled", - PossibleTypes = new [] { typeof(bool) })] - bool VMDiagnosticEnabled { get; set; } - /// The URI of the storage account where diagnostics are stored. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The URI of the storage account where diagnostics are stored.", - SerializedName = @"storageUri", - PossibleTypes = new [] { typeof(string) })] - string VMDiagnosticStorageUri { get; } - - } - /// Profile for diagnostics on the container service cluster. - internal partial interface IContainerServiceDiagnosticsProfileInternal - - { - /// Profile for diagnostics on the container service VMs. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics VMDiagnostic { get; set; } - /// Whether the VM diagnostic agent is provisioned on the VM. - bool VMDiagnosticEnabled { get; set; } - /// The URI of the storage account where diagnostics are stored. - string VMDiagnosticStorageUri { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.PowerShell.cs deleted file mode 100644 index f615e920d005..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.PowerShell.cs +++ /dev/null @@ -1,200 +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.Api20200901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - - /// Profile for the container service master. - [System.ComponentModel.TypeConverter(typeof(ContainerServiceMasterProfileTypeConverter))] - public partial class ContainerServiceMasterProfile - { - - /// - /// 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); - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Collections.IDictionary content that should be used. - internal ContainerServiceMasterProfile(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Count")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DnsPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).DnsPrefix, global::System.Convert.ToString); - } - if (content.Contains("VMSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).VMSize = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).VMSize, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes.CreateFrom); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VnetSubnetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).VnetSubnetId, global::System.Convert.ToString); - } - if (content.Contains("FirstConsecutiveStaticIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).FirstConsecutiveStaticIP = (string) content.GetValueForProperty("FirstConsecutiveStaticIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).FirstConsecutiveStaticIP, global::System.Convert.ToString); - } - if (content.Contains("StorageProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes?) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes.CreateFrom); - } - if (content.Contains("Fqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).Fqdn, 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 ContainerServiceMasterProfile(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Count")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("DnsPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).DnsPrefix, global::System.Convert.ToString); - } - if (content.Contains("VMSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).VMSize = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).VMSize, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes.CreateFrom); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VnetSubnetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).VnetSubnetId, global::System.Convert.ToString); - } - if (content.Contains("FirstConsecutiveStaticIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).FirstConsecutiveStaticIP = (string) content.GetValueForProperty("FirstConsecutiveStaticIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).FirstConsecutiveStaticIP, global::System.Convert.ToString); - } - if (content.Contains("StorageProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes?) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes.CreateFrom); - } - if (content.Contains("Fqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal)this).Fqdn, 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.Api20200901.IContainerServiceMasterProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ContainerServiceMasterProfile(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.Api20200901.IContainerServiceMasterProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ContainerServiceMasterProfile(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.Api20200901.IContainerServiceMasterProfile 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(); - } - /// Profile for the container service master. - [System.ComponentModel.TypeConverter(typeof(ContainerServiceMasterProfileTypeConverter))] - public partial interface IContainerServiceMasterProfile - - { - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.cs deleted file mode 100644 index cbe7f101b42f..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.cs +++ /dev/null @@ -1,197 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Profile for the container service master. - public partial class ContainerServiceMasterProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal - { - - /// Backing field for property. - private int? _count; - - /// - /// Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. - /// - [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 _dnsPrefix; - - /// DNS prefix to be used to create the FQDN for the master pool. - [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 string _firstConsecutiveStaticIP; - - /// FirstConsecutiveStaticIP used to specify the first static ip of masters. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string FirstConsecutiveStaticIP { get => this._firstConsecutiveStaticIP; set => this._firstConsecutiveStaticIP = value; } - - /// Backing field for property. - private string _fqdn; - - /// FQDN for the master pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Fqdn { get => this._fqdn; } - - /// Internal Acessors for Fqdn - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfileInternal.Fqdn { get => this._fqdn; set { {_fqdn = value;} } } - - /// Backing field for property. - private int? _oSDiskSizeGb; - - /// - /// OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, - /// it will apply the default osDisk size according to the vmSize specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public int? OSDiskSizeGb { get => this._oSDiskSizeGb; set => this._oSDiskSizeGb = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes? _storageProfile; - - /// - /// Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - /// choose for you based on the orchestrator choice. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes? StorageProfile { get => this._storageProfile; set => this._storageProfile = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes _vMSize; - - /// Size of agent VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes VMSize { get => this._vMSize; set => this._vMSize = value; } - - /// Backing field for property. - private string _vnetSubnetId; - - /// VNet SubnetID specifies the VNet's subnet identifier. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string VnetSubnetId { get => this._vnetSubnetId; set => this._vnetSubnetId = value; } - - /// Creates an new instance. - public ContainerServiceMasterProfile() - { - - } - } - /// Profile for the container service master. - public partial interface IContainerServiceMasterProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// - /// Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1.", - SerializedName = @"count", - PossibleTypes = new [] { typeof(int) })] - int? Count { get; set; } - /// DNS prefix to be used to create the FQDN for the master pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"DNS prefix to be used to create the FQDN for the master pool.", - SerializedName = @"dnsPrefix", - PossibleTypes = new [] { typeof(string) })] - string DnsPrefix { get; set; } - /// FirstConsecutiveStaticIP used to specify the first static ip of masters. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"FirstConsecutiveStaticIP used to specify the first static ip of masters.", - SerializedName = @"firstConsecutiveStaticIP", - PossibleTypes = new [] { typeof(string) })] - string FirstConsecutiveStaticIP { get; set; } - /// FQDN for the master pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"FQDN for the master pool.", - SerializedName = @"fqdn", - PossibleTypes = new [] { typeof(string) })] - string Fqdn { get; } - /// - /// OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, - /// it will apply the default osDisk size according to the vmSize specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.", - SerializedName = @"osDiskSizeGB", - PossibleTypes = new [] { typeof(int) })] - int? OSDiskSizeGb { get; set; } - /// - /// Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - /// choose for you based on the orchestrator choice. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will choose for you based on the orchestrator choice.", - SerializedName = @"storageProfile", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes? StorageProfile { get; set; } - /// Size of agent VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Size of agent VMs.", - SerializedName = @"vmSize", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes VMSize { get; set; } - /// VNet SubnetID specifies the VNet's subnet identifier. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"VNet SubnetID specifies the VNet's subnet identifier.", - SerializedName = @"vnetSubnetID", - PossibleTypes = new [] { typeof(string) })] - string VnetSubnetId { get; set; } - - } - /// Profile for the container service master. - internal partial interface IContainerServiceMasterProfileInternal - - { - /// - /// Number of masters (VMs) in the container service cluster. Allowed values are 1, 3, and 5. The default value is 1. - /// - int? Count { get; set; } - /// DNS prefix to be used to create the FQDN for the master pool. - string DnsPrefix { get; set; } - /// FirstConsecutiveStaticIP used to specify the first static ip of masters. - string FirstConsecutiveStaticIP { get; set; } - /// FQDN for the master pool. - string Fqdn { get; set; } - /// - /// OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, - /// it will apply the default osDisk size according to the vmSize specified. - /// - int? OSDiskSizeGb { get; set; } - /// - /// Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - /// choose for you based on the orchestrator choice. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes? StorageProfile { get; set; } - /// Size of agent VMs. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes VMSize { get; set; } - /// VNet SubnetID specifies the VNet's subnet identifier. - string VnetSubnetId { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.cs deleted file mode 100644 index 020fd4fd8bbd..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.cs +++ /dev/null @@ -1,349 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Profile of network configuration. - public partial class ContainerServiceNetworkProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal - { - - /// Backing field for property. - private string _dnsServiceIP; - - /// - /// 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 DnsServiceIP { get => this._dnsServiceIP; set => this._dnsServiceIP = value; } - - /// Backing field for property. - private string _dockerBridgeCidr; - - /// - /// 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string DockerBridgeCidr { get => this._dockerBridgeCidr; set => this._dockerBridgeCidr = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile _loadBalancerProfile; - - /// Profile of the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile LoadBalancerProfile { get => (this._loadBalancerProfile = this._loadBalancerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfile()); set => this._loadBalancerProfile = value; } - - /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? LoadBalancerProfileAllocatedOutboundPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).AllocatedOutboundPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).AllocatedOutboundPort = value ?? default(int); } - - /// The effective outbound IP resources of the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EffectiveOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EffectiveOutboundIP = value ?? null /* arrayOf */; } - - /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? LoadBalancerProfileIdleTimeoutInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).IdleTimeoutInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).IdleTimeoutInMinute = value ?? default(int); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? _loadBalancerSku; - - /// The load balancer sku for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? LoadBalancerSku { get => this._loadBalancerSku; set => this._loadBalancerSku = value; } - - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? ManagedOutboundIPCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIPCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIPCount = value ?? default(int); } - - /// Internal Acessors for LoadBalancerProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal.LoadBalancerProfile { get => (this._loadBalancerProfile = this._loadBalancerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfile()); set { {_loadBalancerProfile = value;} } } - - /// Internal Acessors for LoadBalancerProfileManagedOutboundIP - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal.LoadBalancerProfileManagedOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIP = value; } - - /// Internal Acessors for LoadBalancerProfileOutboundIP - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal.LoadBalancerProfileOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIP = value; } - - /// Internal Acessors for LoadBalancerProfileOutboundIPPrefix - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal.LoadBalancerProfileOutboundIPPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefix = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? _networkMode; - - /// Network mode used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkMode { get => this._networkMode; set => this._networkMode = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? _networkPlugin; - - /// Network plugin used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkPlugin { get => this._networkPlugin; set => this._networkPlugin = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? _networkPolicy; - - /// Network policy used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkPolicy { get => this._networkPolicy; set => this._networkPolicy = value; } - - /// A list of public IP prefix resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefixPublicIpprefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefixPublicIpprefix = value ?? null /* arrayOf */; } - - /// A list of public IP resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPublicIP = value ?? null /* arrayOf */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? _outboundType; - - /// The outbound (egress) routing method. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? OutboundType { get => this._outboundType; set => this._outboundType = value; } - - /// Backing field for property. - private string _podCidr; - - /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string PodCidr { get => this._podCidr; set => this._podCidr = value; } - - /// Backing field for property. - private string _serviceCidr; - - /// - /// 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.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string ServiceCidr { get => this._serviceCidr; set => this._serviceCidr = value; } - - /// Creates an new instance. - public ContainerServiceNetworkProfile() - { - - } - } - /// Profile of network configuration. - 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - 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; } - /// - /// 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - 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", - PossibleTypes = new [] { typeof(string) })] - string DockerBridgeCidr { get; set; } - /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports.", - SerializedName = @"allocatedOutboundPorts", - PossibleTypes = new [] { typeof(int) })] - int? LoadBalancerProfileAllocatedOutboundPort { get; set; } - /// The effective outbound IP resources of the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The effective outbound IP resources of the cluster load balancer.", - SerializedName = @"effectiveOutboundIPs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get; set; } - /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes.", - SerializedName = @"idleTimeoutInMinutes", - PossibleTypes = new [] { typeof(int) })] - int? LoadBalancerProfileIdleTimeoutInMinute { get; set; } - /// The load balancer sku for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The load balancer sku for the managed cluster.", - SerializedName = @"loadBalancerSku", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? LoadBalancerSku { get; set; } - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ", - SerializedName = @"count", - PossibleTypes = new [] { typeof(int) })] - int? ManagedOutboundIPCount { get; set; } - /// Network mode used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Network mode used for building Kubernetes network.", - SerializedName = @"networkMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkMode { get; set; } - /// Network plugin used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Network plugin used for building Kubernetes network.", - SerializedName = @"networkPlugin", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkPlugin { get; set; } - /// Network policy used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Network policy used for building Kubernetes network.", - SerializedName = @"networkPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkPolicy { get; set; } - /// A list of public IP prefix resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of public IP prefix resources.", - SerializedName = @"publicIPPrefixes", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } - /// A list of public IP resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of public IP resources.", - SerializedName = @"publicIPs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get; set; } - /// The outbound (egress) routing method. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The outbound (egress) routing method.", - SerializedName = @"outboundType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? 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( - Required = false, - ReadOnly = false, - Description = @"A CIDR notation IP range from which to assign pod IPs when kubenet is used.", - SerializedName = @"podCidr", - PossibleTypes = new [] { typeof(string) })] - string PodCidr { 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( - Required = false, - ReadOnly = false, - Description = @"A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.", - SerializedName = @"serviceCidr", - PossibleTypes = new [] { typeof(string) })] - string ServiceCidr { get; set; } - - } - /// Profile of network configuration. - internal partial interface IContainerServiceNetworkProfileInternal - - { - /// - /// 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; } - /// Profile of the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile LoadBalancerProfile { get; set; } - /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. - /// - int? LoadBalancerProfileAllocatedOutboundPort { get; set; } - /// The effective outbound IP resources of the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get; set; } - /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. - /// - int? LoadBalancerProfileIdleTimeoutInMinute { get; set; } - /// Desired managed outbound IPs for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs LoadBalancerProfileManagedOutboundIP { get; set; } - /// Desired outbound IP resources for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs LoadBalancerProfileOutboundIP { get; set; } - /// Desired outbound IP Prefix resources for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes LoadBalancerProfileOutboundIPPrefix { get; set; } - /// The load balancer sku for the managed cluster. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? LoadBalancerSku { get; set; } - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - int? ManagedOutboundIPCount { get; set; } - /// Network mode used for building Kubernetes network. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkMode { get; set; } - /// Network plugin used for building Kubernetes network. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkPlugin { get; set; } - /// Network policy used for building Kubernetes network. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkPolicy { get; set; } - /// A list of public IP prefix resources. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } - /// A list of public IP resources. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get; set; } - /// The outbound (egress) routing method. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? OutboundType { get; set; } - /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. - string PodCidr { 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; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.cs deleted file mode 100644 index 5978ff5baad2..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.cs +++ /dev/null @@ -1,71 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Profile for diagnostics on the container service VMs. - public partial class ContainerServiceVMDiagnostics : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal - { - - /// Backing field for property. - private bool _enabled; - - /// Whether the VM diagnostic agent is provisioned on the VM. - [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 StorageUri - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal.StorageUri { get => this._storageUri; set { {_storageUri = value;} } } - - /// Backing field for property. - private string _storageUri; - - /// The URI of the storage account where diagnostics are stored. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string StorageUri { get => this._storageUri; } - - /// Creates an new instance. - public ContainerServiceVMDiagnostics() - { - - } - } - /// Profile for diagnostics on the container service VMs. - public partial interface IContainerServiceVMDiagnostics : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// Whether the VM diagnostic agent is provisioned on the VM. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Whether the VM diagnostic agent is provisioned on the VM.", - SerializedName = @"enabled", - PossibleTypes = new [] { typeof(bool) })] - bool Enabled { get; set; } - /// The URI of the storage account where diagnostics are stored. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The URI of the storage account where diagnostics are stored.", - SerializedName = @"storageUri", - PossibleTypes = new [] { typeof(string) })] - string StorageUri { get; } - - } - /// Profile for diagnostics on the container service VMs. - internal partial interface IContainerServiceVMDiagnosticsInternal - - { - /// Whether the VM diagnostic agent is provisioned on the VM. - bool Enabled { get; set; } - /// The URI of the storage account where diagnostics are stored. - string StorageUri { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.PowerShell.cs deleted file mode 100644 index 9732a595cc66..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.PowerShell.cs +++ /dev/null @@ -1,840 +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.Api20200901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - - /// Managed cluster. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterTypeConverter))] - public partial class ManagedCluster - { - - /// - /// 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); - - /// - /// 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.Api20200901.IManagedCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ManagedCluster(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.Api20200901.IManagedCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ManagedCluster(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.Api20200901.IManagedCluster 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 ManagedCluster(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterSkuTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile) content.GetValueForProperty("LinuxProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfileTypeConverter.ConvertFrom); - } - if (content.Contains("WindowsProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ServicePrincipalProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile) content.GetValueForProperty("ServicePrincipalProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AadProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AutoScalerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ApiServerAccessProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile) content.GetValueForProperty("ApiServerAccessProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("MaxAgentPool")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).MaxAgentPool = (int?) content.GetValueForProperty("MaxAgentPool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).MaxAgentPool, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KubernetesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString); - } - if (content.Contains("DnsPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DnsPrefix, global::System.Convert.ToString); - } - if (content.Contains("Fqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Fqdn, global::System.Convert.ToString); - } - if (content.Contains("PrivateFqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PrivateFqdn = (string) content.GetValueForProperty("PrivateFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PrivateFqdn, global::System.Convert.ToString); - } - if (content.Contains("AgentPoolProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileTypeConverter.ConvertFrom)); - } - if (content.Contains("AddonProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AddonProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles) content.GetValueForProperty("AddonProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AddonProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAddonProfilesTypeConverter.ConvertFrom); - } - if (content.Contains("NodeResourceGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NodeResourceGroup = (string) content.GetValueForProperty("NodeResourceGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NodeResourceGroup, global::System.Convert.ToString); - } - if (content.Contains("EnableRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnablePodSecurityPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DiskEncryptionSetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); - } - if (content.Contains("IdentityProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile) content.GetValueForProperty("IdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfileTypeConverter.ConvertFrom); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("WindowProfileLicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileLicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileLicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPlugin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin?) content.GetValueForProperty("NetworkProfileNetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy?) content.GetValueForProperty("NetworkProfileNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode?) content.GetValueForProperty("NetworkProfileNetworkMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode.CreateFrom); - } - if (content.Contains("NetworkProfileOutboundType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileOutboundType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType?) content.GetValueForProperty("NetworkProfileOutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileOutboundType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType.CreateFrom); - } - if (content.Contains("AutoScalerProfileExpander")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileExpander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileExpander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfileSsh")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileAdminUsername = (string) content.GetValueForProperty("LinuxProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminUsername = (string) content.GetValueForProperty("WindowProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminPassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminPassword = (string) content.GetValueForProperty("WindowProfileAdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminPassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileClientId = (string) content.GetValueForProperty("ServicePrincipalProfileClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileSecret = (string) content.GetValueForProperty("ServicePrincipalProfileSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileSecret, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("NetworkProfileLoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfilePodCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfilePodCidr = (string) content.GetValueForProperty("NetworkProfilePodCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfilePodCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileServiceCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileServiceCidr = (string) content.GetValueForProperty("NetworkProfileServiceCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileServiceCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDnsServiceIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDnsServiceIP = (string) content.GetValueForProperty("NetworkProfileDnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDnsServiceIP, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDockerBridgeCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDockerBridgeCidr = (string) content.GetValueForProperty("NetworkProfileDockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDockerBridgeCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerSku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku?) content.GetValueForProperty("NetworkProfileLoadBalancerSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku.CreateFrom); - } - if (content.Contains("AadProfileManaged")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileManaged = (bool?) content.GetValueForProperty("AadProfileManaged",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileManaged, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileEnableAzureRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileAdminGroupObjectID")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("AadProfileClientAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileClientAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppSecret = (string) content.GetValueForProperty("AadProfileServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppSecret, global::System.Convert.ToString); - } - if (content.Contains("AadProfileTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxGracefulTerminationSec")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec = (string) content.GetValueForProperty("AutoScalerProfileMaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxTotalUnreadyPercentage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage = (string) content.GetValueForProperty("AutoScalerProfileMaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileNewPodScaleUpDelay")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay = (string) content.GetValueForProperty("AutoScalerProfileNewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileOkTotalUnreadyCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount = (string) content.GetValueForProperty("AutoScalerProfileOkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScanInterval")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScanInterval = (string) content.GetValueForProperty("AutoScalerProfileScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScanInterval, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterAdd")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterFailure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnneededTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnreadyTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUtilizationThreshold")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithLocalStorage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithSystemPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod, global::System.Convert.ToString); - } - if (content.Contains("ApiServerAccessProfileAuthorizedIPRange")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange = (string[]) content.GetValueForProperty("ApiServerAccessProfileAuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ApiServerAccessProfileEnablePrivateCluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SshPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileManagedOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIPPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("LoadBalancerProfileOutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("LoadBalancerProfileOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileEffectiveOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("LoadBalancerProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileAllocatedOutboundPort")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileAllocatedOutboundPort = (int?) content.GetValueForProperty("LoadBalancerProfileAllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileAllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LoadBalancerProfileIdleTimeoutInMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("LoadBalancerProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ManagedOutboundIPCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OutboundIPPrefixPublicIpprefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("OutboundIPPublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName.CreateFrom); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier.CreateFrom); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ManagedCluster(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("Sku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterSkuTypeConverter.ConvertFrom); - } - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile) content.GetValueForProperty("LinuxProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfileTypeConverter.ConvertFrom); - } - if (content.Contains("WindowsProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ServicePrincipalProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile) content.GetValueForProperty("ServicePrincipalProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AadProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AutoScalerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ApiServerAccessProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile) content.GetValueForProperty("ApiServerAccessProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("MaxAgentPool")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).MaxAgentPool = (int?) content.GetValueForProperty("MaxAgentPool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).MaxAgentPool, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KubernetesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString); - } - if (content.Contains("DnsPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DnsPrefix, global::System.Convert.ToString); - } - if (content.Contains("Fqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Fqdn, global::System.Convert.ToString); - } - if (content.Contains("PrivateFqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PrivateFqdn = (string) content.GetValueForProperty("PrivateFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PrivateFqdn, global::System.Convert.ToString); - } - if (content.Contains("AgentPoolProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileTypeConverter.ConvertFrom)); - } - if (content.Contains("AddonProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AddonProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles) content.GetValueForProperty("AddonProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AddonProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAddonProfilesTypeConverter.ConvertFrom); - } - if (content.Contains("NodeResourceGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NodeResourceGroup = (string) content.GetValueForProperty("NodeResourceGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NodeResourceGroup, global::System.Convert.ToString); - } - if (content.Contains("EnableRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnablePodSecurityPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DiskEncryptionSetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); - } - if (content.Contains("IdentityProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile) content.GetValueForProperty("IdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfileTypeConverter.ConvertFrom); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("WindowProfileLicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileLicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileLicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPlugin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin?) content.GetValueForProperty("NetworkProfileNetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy?) content.GetValueForProperty("NetworkProfileNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode?) content.GetValueForProperty("NetworkProfileNetworkMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileNetworkMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode.CreateFrom); - } - if (content.Contains("NetworkProfileOutboundType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileOutboundType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType?) content.GetValueForProperty("NetworkProfileOutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileOutboundType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType.CreateFrom); - } - if (content.Contains("AutoScalerProfileExpander")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileExpander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileExpander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); - } - if (content.Contains("IdentityPrincipalId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); - } - if (content.Contains("IdentityTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString); - } - if (content.Contains("IdentityType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType.CreateFrom); - } - if (content.Contains("IdentityUserAssignedIdentity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfileSsh")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileAdminUsername = (string) content.GetValueForProperty("LinuxProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LinuxProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminUsername = (string) content.GetValueForProperty("WindowProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminPassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminPassword = (string) content.GetValueForProperty("WindowProfileAdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).WindowProfileAdminPassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileClientId = (string) content.GetValueForProperty("ServicePrincipalProfileClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileSecret = (string) content.GetValueForProperty("ServicePrincipalProfileSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ServicePrincipalProfileSecret, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("NetworkProfileLoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfilePodCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfilePodCidr = (string) content.GetValueForProperty("NetworkProfilePodCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfilePodCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileServiceCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileServiceCidr = (string) content.GetValueForProperty("NetworkProfileServiceCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileServiceCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDnsServiceIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDnsServiceIP = (string) content.GetValueForProperty("NetworkProfileDnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDnsServiceIP, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDockerBridgeCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDockerBridgeCidr = (string) content.GetValueForProperty("NetworkProfileDockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileDockerBridgeCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerSku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku?) content.GetValueForProperty("NetworkProfileLoadBalancerSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).NetworkProfileLoadBalancerSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku.CreateFrom); - } - if (content.Contains("AadProfileManaged")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileManaged = (bool?) content.GetValueForProperty("AadProfileManaged",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileManaged, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileEnableAzureRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileAdminGroupObjectID")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("AadProfileClientAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileClientAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppSecret = (string) content.GetValueForProperty("AadProfileServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileServerAppSecret, global::System.Convert.ToString); - } - if (content.Contains("AadProfileTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxGracefulTerminationSec")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec = (string) content.GetValueForProperty("AutoScalerProfileMaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxTotalUnreadyPercentage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage = (string) content.GetValueForProperty("AutoScalerProfileMaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileNewPodScaleUpDelay")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay = (string) content.GetValueForProperty("AutoScalerProfileNewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileOkTotalUnreadyCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount = (string) content.GetValueForProperty("AutoScalerProfileOkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScanInterval")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScanInterval = (string) content.GetValueForProperty("AutoScalerProfileScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScanInterval, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterAdd")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterFailure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnneededTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnreadyTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUtilizationThreshold")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithLocalStorage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithSystemPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod, global::System.Convert.ToString); - } - if (content.Contains("ApiServerAccessProfileAuthorizedIPRange")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange = (string[]) content.GetValueForProperty("ApiServerAccessProfileAuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ApiServerAccessProfileEnablePrivateCluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SshPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileManagedOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIPPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("LoadBalancerProfileOutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("LoadBalancerProfileOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileEffectiveOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("LoadBalancerProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileAllocatedOutboundPort")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileAllocatedOutboundPort = (int?) content.GetValueForProperty("LoadBalancerProfileAllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileAllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LoadBalancerProfileIdleTimeoutInMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("LoadBalancerProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).LoadBalancerProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ManagedOutboundIPCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OutboundIPPrefixPublicIpprefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("OutboundIPPublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("Property")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesTypeConverter.ConvertFrom); - } - if (content.Contains("Identity")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityTypeConverter.ConvertFrom); - } - if (content.Contains("SkuName")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName.CreateFrom); - } - if (content.Contains("SkuTier")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier.CreateFrom); - } - 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(); - } - /// Managed cluster. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterTypeConverter))] - public partial interface IManagedCluster - - { - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.cs deleted file mode 100644 index 12d70946561a..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.cs +++ /dev/null @@ -1,507 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Managed cluster. - public partial class ManagedCluster : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedCluster __baseManagedCluster = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.BaseManagedCluster(); - - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.Resource(); - - /// Profile of Azure Active Directory configuration. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile AadProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfile = value ?? null /* model class */; } - - /// AAD group object IDs that will have admin role of the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string[] AadProfileAdminGroupObjectID { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileAdminGroupObjectID; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileAdminGroupObjectID = value ?? null /* arrayOf */; } - - /// The client AAD application ID. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AadProfileClientAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileClientAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileClientAppId = value ?? null; } - - /// Whether to enable Azure RBAC for Kubernetes authorization. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public bool? AadProfileEnableAzureRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileEnableAzureRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileEnableAzureRbac = value ?? default(bool); } - - /// Whether to enable managed AAD. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public bool? AadProfileManaged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileManaged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileManaged = value ?? default(bool); } - - /// The server AAD application ID. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AadProfileServerAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileServerAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileServerAppId = value ?? null; } - - /// The server AAD application secret. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AadProfileServerAppSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileServerAppSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileServerAppSecret = value ?? null; } - - /// - /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AadProfileTenantId = value ?? null; } - - /// Profile of managed cluster add-on. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles AddonProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AddonProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AddonProfile = value ?? null /* model class */; } - - /// Properties of the agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AgentPoolProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AgentPoolProfile = value ?? null /* arrayOf */; } - - /// Access profile for managed cluster API server. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile ApiServerAccessProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ApiServerAccessProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ApiServerAccessProfile = value ?? null /* model class */; } - - /// Authorized IP Ranges to kubernetes API server. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string[] ApiServerAccessProfileAuthorizedIPRange { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ApiServerAccessProfileAuthorizedIPRange; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ApiServerAccessProfileAuthorizedIPRange = value ?? null /* arrayOf */; } - - /// Whether to create the cluster as a private cluster or not. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public bool? ApiServerAccessProfileEnablePrivateCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ApiServerAccessProfileEnablePrivateCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ApiServerAccessProfileEnablePrivateCluster = value ?? default(bool); } - - /// Parameters to be applied to the cluster-autoscaler when enabled - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfile = value ?? null /* model class */; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileBalanceSimilarNodeGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileBalanceSimilarNodeGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileBalanceSimilarNodeGroup = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileExpander; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileExpander = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander)""); } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileMaxEmptyBulkDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileMaxEmptyBulkDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileMaxEmptyBulkDelete = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileMaxGracefulTerminationSec { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileMaxGracefulTerminationSec; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileMaxGracefulTerminationSec = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileMaxTotalUnreadyPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileMaxTotalUnreadyPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileMaxTotalUnreadyPercentage = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileNewPodScaleUpDelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileNewPodScaleUpDelay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileNewPodScaleUpDelay = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileOkTotalUnreadyCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileOkTotalUnreadyCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileOkTotalUnreadyCount = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileScaleDownDelayAfterAdd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownDelayAfterAdd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownDelayAfterAdd = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileScaleDownDelayAfterDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownDelayAfterDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownDelayAfterDelete = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileScaleDownDelayAfterFailure { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownDelayAfterFailure; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownDelayAfterFailure = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileScaleDownUnneededTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownUnneededTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownUnneededTime = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileScaleDownUnreadyTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownUnreadyTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownUnreadyTime = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileScaleDownUtilizationThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownUtilizationThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScaleDownUtilizationThreshold = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileScanInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScanInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileScanInterval = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileSkipNodesWithLocalStorage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileSkipNodesWithLocalStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileSkipNodesWithLocalStorage = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string AutoScalerProfileSkipNodesWithSystemPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileSkipNodesWithSystemPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).AutoScalerProfileSkipNodesWithSystemPod = value ?? null; } - - /// ResourceId of the disk encryption set to use for enabling encryption at rest. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string DiskEncryptionSetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).DiskEncryptionSetId = value ?? null; } - - /// DNS prefix specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string DnsPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).DnsPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).DnsPrefix = value ?? null; } - - /// - /// (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, - /// 2020. Learn more at aka.ms/aks/azpodpolicy. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public bool? EnablePodSecurityPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).EnablePodSecurityPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).EnablePodSecurityPolicy = value ?? default(bool); } - - /// Whether to enable Kubernetes Role-Based Access Control. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public bool? EnableRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).EnableRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).EnableRbac = value ?? default(bool); } - - /// FQDN for the master pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string Fqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).Fqdn; } - - /// 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.Api20200901.IResourceInternal)__resource).Id; } - - /// The identity of the managed cluster, if configured. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity Identity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).Identity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).Identity = value ?? null /* model class */; } - - /// - /// 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.Inherited)] - public string IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityPrincipalId; } - - /// Identities associated with the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile IdentityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityProfile = value ?? null /* model class */; } - - /// - /// The tenant id of the system assigned identity which is used by master components. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityTenantId; } - - /// - /// The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master - /// components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI - /// for the managed cluster, service principal will be used instead. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType)""); } - - /// - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will 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.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityUserAssignedIdentity = value ?? null /* model class */; } - - /// Version of Kubernetes specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).KubernetesVersion = value ?? null; } - - /// Profile for Linux VMs in the container service cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile LinuxProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LinuxProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LinuxProfile = value ?? null /* model class */; } - - /// The administrator username to use for Linux VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string LinuxProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LinuxProfileAdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LinuxProfileAdminUsername = value ?? null; } - - /// SSH configuration for Linux-based VMs running on Azure. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration LinuxProfileSsh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LinuxProfileSsh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LinuxProfileSsh = value ?? null /* model class */; } - - /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public int? LoadBalancerProfileAllocatedOutboundPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileAllocatedOutboundPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileAllocatedOutboundPort = value ?? default(int); } - - /// The effective outbound IP resources of the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileEffectiveOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileEffectiveOutboundIP = value ?? null /* arrayOf */; } - - /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public int? LoadBalancerProfileIdleTimeoutInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileIdleTimeoutInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileIdleTimeoutInMinute = value ?? default(int); } - - /// Desired managed outbound IPs for the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs LoadBalancerProfileManagedOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileManagedOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileManagedOutboundIP = value ?? null /* model class */; } - - /// Desired outbound IP resources for the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs LoadBalancerProfileOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileOutboundIP = value ?? null /* model class */; } - - /// Desired outbound IP Prefix resources for the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes LoadBalancerProfileOutboundIPPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileOutboundIPPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).LoadBalancerProfileOutboundIPPrefix = value ?? null /* model class */; } - - /// Resource location - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Location = value ; } - - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public int? ManagedOutboundIPCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ManagedOutboundIPCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ManagedOutboundIPCount = value ?? default(int); } - - /// The max number of agent pools for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public int? MaxAgentPool { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).MaxAgentPool; } - - /// Internal Acessors for Fqdn - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.Fqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).Fqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).Fqdn = value; } - - /// Internal Acessors for IdentityPrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityPrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityPrincipalId = value; } - - /// Internal Acessors for IdentityTenantId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).IdentityTenantId = value; } - - /// Internal Acessors for MaxAgentPool - int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.MaxAgentPool { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).MaxAgentPool; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).MaxAgentPool = value; } - - /// Internal Acessors for PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).PowerState = value; } - - /// Internal Acessors for PrivateFqdn - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.PrivateFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).PrivateFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).PrivateFqdn = value; } - - /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ProvisioningState = value; } - - /// Internal Acessors for Sku - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterSku()); set { {_sku = value;} } } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Type = value; } - - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Name; } - - /// Profile of network configuration. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile NetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfile = value ?? null /* model class */; } - - /// - /// 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.Inherited)] - public string NetworkProfileDnsServiceIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileDnsServiceIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileDnsServiceIP = value ?? null; } - - /// - /// 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string NetworkProfileDockerBridgeCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileDockerBridgeCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileDockerBridgeCidr = value ?? null; } - - /// Profile of the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile NetworkProfileLoadBalancerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileLoadBalancerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileLoadBalancerProfile = value ?? null /* model class */; } - - /// The load balancer sku for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? NetworkProfileLoadBalancerSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileLoadBalancerSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileLoadBalancerSku = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku)""); } - - /// Network mode used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkProfileNetworkMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileNetworkMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileNetworkMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode)""); } - - /// Network plugin used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkProfileNetworkPlugin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileNetworkPlugin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileNetworkPlugin = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin)""); } - - /// Network policy used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkProfileNetworkPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileNetworkPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileNetworkPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy)""); } - - /// The outbound (egress) routing method. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? NetworkProfileOutboundType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileOutboundType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileOutboundType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType)""); } - - /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string NetworkProfilePodCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfilePodCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfilePodCidr = value ?? null; } - - /// - /// 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.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string NetworkProfileServiceCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileServiceCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NetworkProfileServiceCidr = value ?? null; } - - /// Name of the resource group containing agent pool nodes. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string NodeResourceGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NodeResourceGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).NodeResourceGroup = value ?? null; } - - /// A list of public IP prefix resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).OutboundIPPrefixPublicIpprefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).OutboundIPPrefixPublicIpprefix = value ?? null /* arrayOf */; } - - /// A list of public IP resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).OutboundIPPublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).OutboundIPPublicIP = value ?? null /* arrayOf */; } - - /// Represents the Power State of the cluster - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).PowerState; } - - /// Tells whether the cluster is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).PowerStateCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).PowerStateCode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } - - /// FQDN of private cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string PrivateFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).PrivateFqdn; } - - /// Properties of a managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties Property { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).Property; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).Property = value ?? null /* model class */; } - - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ProvisioningState; } - - /// - /// Information about a service principal identity for the cluster to use for manipulating Azure APIs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile ServicePrincipalProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ServicePrincipalProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ServicePrincipalProfile = value ?? null /* model class */; } - - /// The ID for the service principal. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ServicePrincipalProfileClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ServicePrincipalProfileClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ServicePrincipalProfileClientId = value ?? null; } - - /// The secret password associated with the service principal in plain text. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ServicePrincipalProfileSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ServicePrincipalProfileSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).ServicePrincipalProfileSecret = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku _sku; - - /// The managed cluster SKU. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterSku()); set => this._sku = value; } - - /// Name of a managed cluster SKU. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName? SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)Sku).Name = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName)""); } - - /// Tier of a managed cluster SKU. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier)""); } - - /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).SshPublicKey = value ?? null /* arrayOf */; } - - /// Resource tags - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Tag = value ?? null /* model class */; } - - /// 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.Api20200901.IResourceInternal)__resource).Type; } - - /// - /// 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:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string WindowProfileAdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).WindowProfileAdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).WindowProfileAdminPassword = value ?? null; } - - /// - /// Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string WindowProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).WindowProfileAdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).WindowProfileAdminUsername = value ?? null; } - - /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).WindowProfileLicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).WindowProfileLicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType)""); } - - /// Profile for Windows VMs in the container service cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile WindowsProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).WindowsProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal)__baseManagedCluster).WindowsProfile = value ?? null /* model class */; } - - /// Creates an new instance. - public ManagedCluster() - { - - } - - /// 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); - await eventListener.AssertNotNull(nameof(__baseManagedCluster), __baseManagedCluster); - await eventListener.AssertObjectIsValid(nameof(__baseManagedCluster), __baseManagedCluster); - } - } - /// Managed cluster. - public partial interface IManagedCluster : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResource, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedCluster - { - /// Name of a managed cluster SKU. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of a managed cluster SKU.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName? SkuName { get; set; } - /// Tier of a managed cluster SKU. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Tier of a managed cluster SKU.", - SerializedName = @"tier", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier? SkuTier { get; set; } - - } - /// Managed cluster. - internal partial interface IManagedClusterInternal : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedClusterInternal - { - /// The managed cluster SKU. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku Sku { get; set; } - /// Name of a managed cluster SKU. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName? SkuName { get; set; } - /// Tier of a managed cluster SKU. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier? SkuTier { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.cs deleted file mode 100644 index 3849727ca24a..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.cs +++ /dev/null @@ -1,107 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Managed cluster Access Profile. - public partial class ManagedClusterAccessProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfileInternal, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.Resource(); - - /// 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.Api20200901.IResourceInternal)__resource).Id; } - - /// Base64-encoded Kubernetes configuration file. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public byte[] KubeConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfileInternal)Property).KubeConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfileInternal)Property).KubeConfig = value ?? null /* byte array */; } - - /// Resource location - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Location = value ; } - - /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AccessProfile()); set { {_property = value;} } } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Id = value; } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Name = value; } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Type = value; } - - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile _property; - - /// AccessProfile of a managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AccessProfile()); set => this._property = value; } - - /// Resource tags - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)__resource).Tag = value ?? null /* model class */; } - - /// 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.Api20200901.IResourceInternal)__resource).Type; } - - /// Creates an new instance. - public ManagedClusterAccessProfile() - { - - } - - /// 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); - } - } - /// Managed cluster Access Profile. - public partial interface IManagedClusterAccessProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResource - { - /// Base64-encoded Kubernetes configuration file. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Base64-encoded Kubernetes configuration file.", - SerializedName = @"kubeConfig", - PossibleTypes = new [] { typeof(byte[]) })] - byte[] KubeConfig { get; set; } - - } - /// Managed cluster Access Profile. - internal partial interface IManagedClusterAccessProfileInternal : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal - { - /// Base64-encoded Kubernetes configuration file. - byte[] KubeConfig { get; set; } - /// AccessProfile of a managed cluster. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile Property { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.PowerShell.cs deleted file mode 100644 index a04070772f3c..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.PowerShell.cs +++ /dev/null @@ -1,368 +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.Api20200901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - - /// Profile for the container service agent pool. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfileTypeConverter))] - public partial class ManagedClusterAgentPoolProfile - { - - /// - /// 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); - - /// - /// 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.Api20200901.IManagedClusterAgentPoolProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ManagedClusterAgentPoolProfile(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.Api20200901.IManagedClusterAgentPoolProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ManagedClusterAgentPoolProfile(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.Api20200901.IManagedClusterAgentPoolProfile 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 ManagedClusterAgentPoolProfile(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.Api20200901.IManagedClusterAgentPoolProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("UpgradeSettingMaxSurge")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); - } - if (content.Contains("UpgradeSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("Count")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VMSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes?) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes.CreateFrom); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSDiskType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); - } - if (content.Contains("VnetSubnetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); - } - if (content.Contains("MaxPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); - } - if (content.Contains("MaxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MinCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EnableAutoScaling")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); - } - if (content.Contains("Mode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); - } - if (content.Contains("OrchestratorVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion, global::System.Convert.ToString); - } - if (content.Contains("NodeImageVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("AvailabilityZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("EnableNodePublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ScaleSetPriority")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); - } - if (content.Contains("ScaleSetEvictionPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); - } - if (content.Contains("SpotMaxPrice")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeLabel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeTaint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ProximityPlacementGroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId, 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 ManagedClusterAgentPoolProfile(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.Api20200901.IManagedClusterAgentPoolProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileInternal)this).Name, global::System.Convert.ToString); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("UpgradeSettingMaxSurge")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); - } - if (content.Contains("UpgradeSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("Count")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VMSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes?) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes.CreateFrom); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSDiskType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); - } - if (content.Contains("VnetSubnetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); - } - if (content.Contains("MaxPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); - } - if (content.Contains("MaxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MinCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EnableAutoScaling")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); - } - if (content.Contains("Mode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); - } - if (content.Contains("OrchestratorVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion, global::System.Convert.ToString); - } - if (content.Contains("NodeImageVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("AvailabilityZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("EnableNodePublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ScaleSetPriority")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); - } - if (content.Contains("ScaleSetEvictionPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); - } - if (content.Contains("SpotMaxPrice")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeLabel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeTaint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ProximityPlacementGroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId, 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(); - } - /// Profile for the container service agent pool. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfileTypeConverter))] - public partial interface IManagedClusterAgentPoolProfile - - { - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.cs deleted file mode 100644 index 9fea804c1e2a..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.cs +++ /dev/null @@ -1,221 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Profile for the container service agent pool. - public partial class ManagedClusterAgentPoolProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileInternal, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties __managedClusterAgentPoolProfileProperties = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileProperties(); - - /// Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string[] AvailabilityZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).AvailabilityZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).AvailabilityZone = value ?? null /* arrayOf */; } - - /// - /// Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user - /// pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public int? Count { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Count = value ?? default(int); } - - /// 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.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableAutoScaling; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableAutoScaling = value ?? default(bool); } - - /// Enable public IP for nodes - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public bool? EnableNodePublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableNodePublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableNodePublicIP = value ?? default(bool); } - - /// Maximum number of nodes for auto-scaling - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public int? MaxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MaxCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MaxCount = value ?? default(int); } - - /// Maximum number of pods that can run on a node. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public int? MaxPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MaxPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MaxPod = value ?? default(int); } - - /// Internal Acessors for NodeImageVersion - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion = value; } - - /// Internal Acessors for PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState = value; } - - /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState = value; } - - /// 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.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MinCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MinCount = value ?? default(int); } - - /// AgentPoolMode represents mode of an agent pool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Mode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Mode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode)""); } - - /// Backing field for property. - private string _name; - - /// - /// Unique name of the agent pool profile in the context of the subscription and resource group. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Name { get => this._name; set => this._name = value; } - - /// 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.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion; } - - /// Agent pool node labels to be persisted across all nodes in agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeLabel = value ?? null /* model class */; } - - /// - /// Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string[] NodeTaint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeTaint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeTaint = value ?? null /* arrayOf */; } - - /// - /// OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, - /// it will apply the default osDisk size according to the vmSize specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskSizeGb = value ?? default(int); } - - /// - /// OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to - /// 'Managed'. May not be changed after creation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType)""); } - - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType)""); } - - /// Version of orchestrator specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string OrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OrchestratorVersion = value ?? null; } - - /// Describes whether the Agent Pool is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState; } - - /// Tells whether the cluster is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerStateCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerStateCode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } - - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState; } - - /// The ID for Proximity Placement Group. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ProximityPlacementGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProximityPlacementGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProximityPlacementGroupId = value ?? null; } - - /// - /// ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetEvictionPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetEvictionPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy)""); } - - /// - /// ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? ScaleSetPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetPriority = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority)""); } - - /// - /// SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal - /// value greater than zero or -1 which indicates default price to be up-to on-demand. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public float? SpotMaxPrice { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SpotMaxPrice; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SpotMaxPrice = value ?? default(float); } - - /// Agent pool 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.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Tag = value ?? null /* model class */; } - - /// AgentPoolType represents types of an agent pool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType)""); } - - /// Settings for upgrading the agentpool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings UpgradeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSetting = value ?? null /* model class */; } - - /// - /// Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string UpgradeSettingMaxSurge { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingMaxSurge; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingMaxSurge = value ?? null; } - - /// Size of agent VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes? VMSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VMSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VMSize = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes)""); } - - /// VNet SubnetID specifies the VNet's subnet identifier. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string VnetSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VnetSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VnetSubnetId = value ?? null; } - - /// Creates an new instance. - public ManagedClusterAgentPoolProfile() - { - - } - - /// 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(__managedClusterAgentPoolProfileProperties), __managedClusterAgentPoolProfileProperties); - await eventListener.AssertObjectIsValid(nameof(__managedClusterAgentPoolProfileProperties), __managedClusterAgentPoolProfileProperties); - } - } - /// Profile for the container service agent pool. - public partial interface IManagedClusterAgentPoolProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties - { - /// - /// Unique name of the agent pool profile in the context of the subscription and resource group. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Unique name of the agent pool profile in the context of the subscription and resource group.", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; set; } - - } - /// Profile for the container service agent pool. - internal partial interface IManagedClusterAgentPoolProfileInternal : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal - { - /// - /// Unique name of the agent pool profile in the context of the subscription and resource group. - /// - string Name { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.PowerShell.cs deleted file mode 100644 index 720ea31d7c5b..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.PowerShell.cs +++ /dev/null @@ -1,365 +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.Api20200901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - - /// Properties for the container service agent pool profile. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfilePropertiesTypeConverter))] - public partial class ManagedClusterAgentPoolProfileProperties - { - - /// - /// 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); - - /// - /// 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.Api20200901.IManagedClusterAgentPoolProfileProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ManagedClusterAgentPoolProfileProperties(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.Api20200901.IManagedClusterAgentPoolProfileProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ManagedClusterAgentPoolProfileProperties(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.Api20200901.IManagedClusterAgentPoolProfileProperties 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 ManagedClusterAgentPoolProfileProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("UpgradeSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("Count")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VMSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes?) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes.CreateFrom); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSDiskType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); - } - if (content.Contains("VnetSubnetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); - } - if (content.Contains("MaxPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); - } - if (content.Contains("MaxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MinCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EnableAutoScaling")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); - } - if (content.Contains("Mode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); - } - if (content.Contains("OrchestratorVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion, global::System.Convert.ToString); - } - if (content.Contains("NodeImageVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("AvailabilityZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("EnableNodePublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ScaleSetPriority")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); - } - if (content.Contains("ScaleSetEvictionPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); - } - if (content.Contains("SpotMaxPrice")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeLabel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeTaint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ProximityPlacementGroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId, global::System.Convert.ToString); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("UpgradeSettingMaxSurge")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, 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 ManagedClusterAgentPoolProfileProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("UpgradeSetting")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); - } - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("Count")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("VMSize")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes?) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes.CreateFrom); - } - if (content.Contains("OSDiskSizeGb")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSDiskType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); - } - if (content.Contains("VnetSubnetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); - } - if (content.Contains("MaxPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OSType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); - } - if (content.Contains("MaxCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("MinCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("EnableAutoScaling")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("Type")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); - } - if (content.Contains("Mode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); - } - if (content.Contains("OrchestratorVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion, global::System.Convert.ToString); - } - if (content.Contains("NodeImageVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion, global::System.Convert.ToString); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("AvailabilityZone")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("EnableNodePublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("ScaleSetPriority")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); - } - if (content.Contains("ScaleSetEvictionPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); - } - if (content.Contains("SpotMaxPrice")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeLabel")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); - } - if (content.Contains("NodeTaint")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ProximityPlacementGroupId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId, global::System.Convert.ToString); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("UpgradeSettingMaxSurge")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, 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(); - } - /// Properties for the container service agent pool profile. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfilePropertiesTypeConverter))] - public partial interface IManagedClusterAgentPoolProfileProperties - - { - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.cs deleted file mode 100644 index 0ea6931bc7f5..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.cs +++ /dev/null @@ -1,574 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Properties for the container service agent pool profile. - public partial class ManagedClusterAgentPoolProfileProperties : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal - { - - /// Backing field for property. - private string[] _availabilityZone; - - /// Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string[] AvailabilityZone { get => this._availabilityZone; set => this._availabilityZone = value; } - - /// Backing field for property. - private int? _count; - - /// - /// Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user - /// pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. - /// - [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 bool? _enableAutoScaling; - - /// Whether to enable auto-scaler - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public bool? EnableAutoScaling { get => this._enableAutoScaling; set => this._enableAutoScaling = value; } - - /// Backing field for property. - private bool? _enableNodePublicIP; - - /// Enable public IP for nodes - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public bool? EnableNodePublicIP { get => this._enableNodePublicIP; set => this._enableNodePublicIP = value; } - - /// Backing field for property. - private int? _maxCount; - - /// Maximum number of nodes for auto-scaling - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public int? MaxCount { get => this._maxCount; set => this._maxCount = value; } - - /// Backing field for property. - private int? _maxPod; - - /// Maximum number of pods that can run on a node. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public int? MaxPod { get => this._maxPod; set => this._maxPod = value; } - - /// Internal Acessors for NodeImageVersion - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal.NodeImageVersion { get => this._nodeImageVersion; set { {_nodeImageVersion = value;} } } - - /// Internal Acessors for PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal.PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerState()); set { {_powerState = value;} } } - - /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Internal Acessors for UpgradeSetting - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesInternal.UpgradeSetting { get => (this._upgradeSetting = this._upgradeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettings()); set { {_upgradeSetting = value;} } } - - /// Backing field for property. - private int? _minCount; - - /// Minimum number of nodes for auto-scaling - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public int? MinCount { get => this._minCount; set => this._minCount = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? _mode; - - /// AgentPoolMode represents mode of an agent pool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get => this._mode; set => this._mode = value; } - - /// Backing field for property. - private string _nodeImageVersion; - - /// Version of node image - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string NodeImageVersion { get => this._nodeImageVersion; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels _nodeLabel; - - /// Agent pool node labels to be persisted across all nodes in agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get => (this._nodeLabel = this._nodeLabel ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabels()); set => this._nodeLabel = value; } - - /// Backing field for property. - private string[] _nodeTaint; - - /// - /// Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string[] NodeTaint { get => this._nodeTaint; set => this._nodeTaint = value; } - - /// Backing field for property. - private int? _oSDiskSizeGb; - - /// - /// OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, - /// it will apply the default osDisk size according to the vmSize specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public int? OSDiskSizeGb { get => this._oSDiskSizeGb; set => this._oSDiskSizeGb = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? _oSDiskType; - - /// - /// OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to - /// 'Managed'. May not be changed after creation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get => this._oSDiskType; set => this._oSDiskType = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? _oSType; - - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get => this._oSType; set => this._oSType = value; } - - /// Backing field for property. - private string _orchestratorVersion; - - /// Version of orchestrator specified when creating the managed cluster. - [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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState _powerState; - - /// Describes whether the Agent Pool is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerState()); } - - /// Tells whether the cluster is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerStateInternal)PowerState).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerStateInternal)PowerState).Code = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } - - /// Backing field for property. - private string _provisioningState; - - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string ProvisioningState { get => this._provisioningState; } - - /// Backing field for property. - private string _proximityPlacementGroupId; - - /// The ID for Proximity Placement Group. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string ProximityPlacementGroupId { get => this._proximityPlacementGroupId; set => this._proximityPlacementGroupId = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? _scaleSetEvictionPolicy; - - /// - /// ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get => this._scaleSetEvictionPolicy; set => this._scaleSetEvictionPolicy = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? _scaleSetPriority; - - /// - /// ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? ScaleSetPriority { get => this._scaleSetPriority; set => this._scaleSetPriority = value; } - - /// Backing field for property. - private float? _spotMaxPrice; - - /// - /// SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal - /// value greater than zero or -1 which indicates default price to be up-to on-demand. - /// - [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.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags _tag; - - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTags()); set => this._tag = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? _type; - - /// AgentPoolType represents types of an agent pool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? Type { get => this._type; set => this._type = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings _upgradeSetting; - - /// Settings for upgrading the agentpool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings UpgradeSetting { get => (this._upgradeSetting = this._upgradeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettings()); set => this._upgradeSetting = value; } - - /// - /// Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string UpgradeSettingMaxSurge { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).MaxSurge; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).MaxSurge = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes? _vMSize; - - /// Size of agent VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes? VMSize { get => this._vMSize; set => this._vMSize = value; } - - /// Backing field for property. - private string _vnetSubnetId; - - /// VNet SubnetID specifies the VNet's subnet identifier. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string VnetSubnetId { get => this._vnetSubnetId; set => this._vnetSubnetId = value; } - - /// - /// Creates an new instance. - /// - public ManagedClusterAgentPoolProfileProperties() - { - - } - } - /// Properties for the container service agent pool profile. - public partial interface IManagedClusterAgentPoolProfileProperties : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType.", - SerializedName = @"availabilityZones", - PossibleTypes = new [] { typeof(string) })] - string[] AvailabilityZone { get; set; } - /// - /// Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user - /// pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1.", - SerializedName = @"count", - PossibleTypes = new [] { typeof(int) })] - int? Count { get; set; } - /// Whether to enable auto-scaler - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether to enable auto-scaler", - SerializedName = @"enableAutoScaling", - PossibleTypes = new [] { typeof(bool) })] - bool? EnableAutoScaling { get; set; } - /// Enable public IP for nodes - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Enable public IP for nodes", - SerializedName = @"enableNodePublicIP", - PossibleTypes = new [] { typeof(bool) })] - bool? EnableNodePublicIP { get; set; } - /// Maximum number of nodes for auto-scaling - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Maximum number of nodes for auto-scaling", - SerializedName = @"maxCount", - PossibleTypes = new [] { typeof(int) })] - int? MaxCount { get; set; } - /// Maximum number of pods that can run on a node. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Maximum number of pods that can run on a node.", - SerializedName = @"maxPods", - PossibleTypes = new [] { typeof(int) })] - int? MaxPod { get; set; } - /// Minimum number of nodes for auto-scaling - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Minimum number of nodes for auto-scaling", - SerializedName = @"minCount", - PossibleTypes = new [] { typeof(int) })] - int? MinCount { get; set; } - /// AgentPoolMode represents mode of an agent pool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"AgentPoolMode represents mode of an agent pool", - SerializedName = @"mode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get; set; } - /// Version of node image - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Version of node image", - SerializedName = @"nodeImageVersion", - PossibleTypes = new [] { typeof(string) })] - string NodeImageVersion { get; } - /// Agent pool node labels to be persisted across all nodes in agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Agent pool node labels to be persisted across all nodes in agent pool.", - SerializedName = @"nodeLabels", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } - /// - /// Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.", - SerializedName = @"nodeTaints", - PossibleTypes = new [] { typeof(string) })] - string[] NodeTaint { get; set; } - /// - /// OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, - /// it will apply the default osDisk size according to the vmSize specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.", - SerializedName = @"osDiskSizeGB", - PossibleTypes = new [] { typeof(int) })] - int? OSDiskSizeGb { get; set; } - /// - /// OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to - /// 'Managed'. May not be changed after creation. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to 'Managed'. May not be changed after creation.", - SerializedName = @"osDiskType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.", - SerializedName = @"osType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get; set; } - /// Version of orchestrator specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Version of orchestrator specified when creating the managed cluster.", - SerializedName = @"orchestratorVersion", - PossibleTypes = new [] { typeof(string) })] - string OrchestratorVersion { get; set; } - /// Tells whether the cluster is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Tells whether the cluster is Running or Stopped", - SerializedName = @"code", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current deployment or provisioning state, which only appears in the response.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } - /// The ID for Proximity Placement Group. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The ID for Proximity Placement Group.", - SerializedName = @"proximityPlacementGroupID", - PossibleTypes = new [] { typeof(string) })] - string ProximityPlacementGroupId { get; set; } - /// - /// ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete.", - SerializedName = @"scaleSetEvictionPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get; set; } - /// - /// ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular.", - SerializedName = @"scaleSetPriority", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? ScaleSetPriority { get; set; } - /// - /// SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal - /// value greater than zero or -1 which indicates default price to be up-to on-demand. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal value greater than zero or -1 which indicates default price to be up-to on-demand.", - SerializedName = @"spotMaxPrice", - PossibleTypes = new [] { typeof(float) })] - float? SpotMaxPrice { get; set; } - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Agent pool tags to be persisted on the agent pool virtual machine scale set.", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags Tag { get; set; } - /// AgentPoolType represents types of an agent pool - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"AgentPoolType represents types of an agent pool", - SerializedName = @"type", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? Type { get; set; } - /// - /// Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default", - SerializedName = @"maxSurge", - PossibleTypes = new [] { typeof(string) })] - string UpgradeSettingMaxSurge { get; set; } - /// Size of agent VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Size of agent VMs.", - SerializedName = @"vmSize", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes? VMSize { get; set; } - /// VNet SubnetID specifies the VNet's subnet identifier. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"VNet SubnetID specifies the VNet's subnet identifier.", - SerializedName = @"vnetSubnetID", - PossibleTypes = new [] { typeof(string) })] - string VnetSubnetId { get; set; } - - } - /// Properties for the container service agent pool profile. - internal partial interface IManagedClusterAgentPoolProfilePropertiesInternal - - { - /// Availability zones for nodes. Must use VirtualMachineScaleSets AgentPoolType. - string[] AvailabilityZone { get; set; } - /// - /// Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 100 (inclusive) for user - /// pools and in the range of 1 to 100 (inclusive) for system pools. The default value is 1. - /// - int? Count { get; set; } - /// Whether to enable auto-scaler - bool? EnableAutoScaling { get; set; } - /// Enable public IP for nodes - bool? EnableNodePublicIP { get; set; } - /// Maximum number of nodes for auto-scaling - int? MaxCount { get; set; } - /// Maximum number of pods that can run on a node. - int? MaxPod { get; set; } - /// Minimum number of nodes for auto-scaling - int? MinCount { get; set; } - /// AgentPoolMode represents mode of an agent pool - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get; set; } - /// Version of node image - string NodeImageVersion { get; set; } - /// Agent pool node labels to be persisted across all nodes in agent pool. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } - /// - /// Taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. - /// - string[] NodeTaint { get; set; } - /// - /// OS Disk Size in GB to be used to specify the disk size for every machine in this master/agent pool. If you specify 0, - /// it will apply the default osDisk size according to the vmSize specified. - /// - int? OSDiskSizeGb { get; set; } - /// - /// OS disk type to be used for machines in a given agent pool. Allowed values are 'Ephemeral' and 'Managed'. Defaults to - /// 'Managed'. May not be changed after creation. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get; set; } - /// Version of orchestrator specified when creating the managed cluster. - string OrchestratorVersion { get; set; } - /// Describes whether the Agent Pool is Running or Stopped - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState PowerState { get; set; } - /// Tells whether the cluster is Running or Stopped - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - string ProvisioningState { get; set; } - /// The ID for Proximity Placement Group. - string ProximityPlacementGroupId { get; set; } - /// - /// ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get; set; } - /// - /// ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? ScaleSetPriority { get; set; } - /// - /// SpotMaxPrice to be used to specify the maximum price you are willing to pay in US Dollars. Possible values are any decimal - /// value greater than zero or -1 which indicates default price to be up-to on-demand. - /// - float? SpotMaxPrice { get; set; } - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags Tag { get; set; } - /// AgentPoolType represents types of an agent pool - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? Type { get; set; } - /// Settings for upgrading the agentpool - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings UpgradeSetting { get; set; } - /// - /// Count or percentage of additional nodes to be added during upgrade. If empty uses AKS default - /// - string UpgradeSettingMaxSurge { get; set; } - /// Size of agent VMs. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes? VMSize { get; set; } - /// VNet SubnetID specifies the VNet's subnet identifier. - string VnetSubnetId { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.cs deleted file mode 100644 index fd2affec221b..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.cs +++ /dev/null @@ -1,68 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Access profile for managed cluster API server. - public partial class ManagedClusterApiServerAccessProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal - { - - /// Backing field for property. - private string[] _authorizedIPRange; - - /// Authorized IP Ranges to kubernetes API server. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string[] AuthorizedIPRange { get => this._authorizedIPRange; set => this._authorizedIPRange = value; } - - /// Backing field for property. - private bool? _enablePrivateCluster; - - /// Whether to create the cluster as a private cluster or not. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public bool? EnablePrivateCluster { get => this._enablePrivateCluster; set => this._enablePrivateCluster = value; } - - /// Creates an new instance. - public ManagedClusterApiServerAccessProfile() - { - - } - } - /// Access profile for managed cluster API server. - public partial interface IManagedClusterApiServerAccessProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// Authorized IP Ranges to kubernetes API server. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authorized IP Ranges to kubernetes API server.", - SerializedName = @"authorizedIPRanges", - PossibleTypes = new [] { typeof(string) })] - string[] AuthorizedIPRange { get; set; } - /// Whether to create the cluster as a private cluster or not. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether to create the cluster as a private cluster or not.", - SerializedName = @"enablePrivateCluster", - PossibleTypes = new [] { typeof(bool) })] - bool? EnablePrivateCluster { get; set; } - - } - /// Access profile for managed cluster API server. - internal partial interface IManagedClusterApiServerAccessProfileInternal - - { - /// Authorized IP Ranges to kubernetes API server. - string[] AuthorizedIPRange { get; set; } - /// Whether to create the cluster as a private cluster or not. - bool? EnablePrivateCluster { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.cs deleted file mode 100644 index 04536e0ae693..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.cs +++ /dev/null @@ -1,42 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will 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.Api20200901.IManagedClusterIdentityUserAssignedIdentities, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesInternal - { - - /// - /// Creates an new instance. - /// - public ManagedClusterIdentityUserAssignedIdentities() - { - - } - } - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will 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 user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. - internal partial interface IManagedClusterIdentityUserAssignedIdentitiesInternal - - { - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs deleted file mode 100644 index 0a9ea48e3981..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs +++ /dev/null @@ -1,62 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Desired managed outbound IPs for the cluster load balancer. - public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal - { - - /// Backing field for property. - private int? _count; - - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public int? Count { get => this._count; set => this._count = value; } - - /// - /// Creates an new instance. - /// - public ManagedClusterLoadBalancerProfileManagedOutboundIPs() - { - - } - } - /// Desired managed outbound IPs for the cluster load balancer. - public partial interface IManagedClusterLoadBalancerProfileManagedOutboundIPs : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ", - SerializedName = @"count", - PossibleTypes = new [] { typeof(int) })] - int? Count { get; set; } - - } - /// Desired managed outbound IPs for the cluster load balancer. - internal partial interface IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal - - { - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - int? Count { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.PowerShell.cs deleted file mode 100644 index e8780b556591..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.PowerShell.cs +++ /dev/null @@ -1,728 +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.Api20200901 -{ - using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - - /// Properties of the managed cluster. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterPropertiesTypeConverter))] - public partial class ManagedClusterProperties - { - - /// - /// 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); - - /// - /// 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.Api20200901.IManagedClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ManagedClusterProperties(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.Api20200901.IManagedClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ManagedClusterProperties(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.Api20200901.IManagedClusterProperties 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 ManagedClusterProperties(global::System.Collections.IDictionary content) - { - bool returnNow = false; - BeforeDeserializeDictionary(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile) content.GetValueForProperty("LinuxProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfileTypeConverter.ConvertFrom); - } - if (content.Contains("WindowsProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ServicePrincipalProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile) content.GetValueForProperty("ServicePrincipalProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AadProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AutoScalerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ApiServerAccessProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile) content.GetValueForProperty("ApiServerAccessProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("MaxAgentPool")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).MaxAgentPool = (int?) content.GetValueForProperty("MaxAgentPool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).MaxAgentPool, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KubernetesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); - } - if (content.Contains("DnsPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).DnsPrefix, global::System.Convert.ToString); - } - if (content.Contains("Fqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).Fqdn, global::System.Convert.ToString); - } - if (content.Contains("PrivateFqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PrivateFqdn = (string) content.GetValueForProperty("PrivateFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PrivateFqdn, global::System.Convert.ToString); - } - if (content.Contains("AgentPoolProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileTypeConverter.ConvertFrom)); - } - if (content.Contains("AddonProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AddonProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles) content.GetValueForProperty("AddonProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AddonProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAddonProfilesTypeConverter.ConvertFrom); - } - if (content.Contains("NodeResourceGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NodeResourceGroup = (string) content.GetValueForProperty("NodeResourceGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NodeResourceGroup, global::System.Convert.ToString); - } - if (content.Contains("EnableRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnablePodSecurityPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DiskEncryptionSetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); - } - if (content.Contains("IdentityProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).IdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile) content.GetValueForProperty("IdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).IdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfileTypeConverter.ConvertFrom); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("WindowProfileLicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPlugin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin?) content.GetValueForProperty("NetworkProfileNetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy?) content.GetValueForProperty("NetworkProfileNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode?) content.GetValueForProperty("NetworkProfileNetworkMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode.CreateFrom); - } - if (content.Contains("NetworkProfileOutboundType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileOutboundType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType?) content.GetValueForProperty("NetworkProfileOutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileOutboundType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType.CreateFrom); - } - if (content.Contains("AutoScalerProfileExpander")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); - } - if (content.Contains("LinuxProfileSsh")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfileAdminUsername = (string) content.GetValueForProperty("LinuxProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileAdminUsername = (string) content.GetValueForProperty("WindowProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminPassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileAdminPassword = (string) content.GetValueForProperty("WindowProfileAdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileAdminPassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileClientId = (string) content.GetValueForProperty("ServicePrincipalProfileClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileSecret = (string) content.GetValueForProperty("ServicePrincipalProfileSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileSecret, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileLoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("NetworkProfileLoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileLoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfilePodCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfilePodCidr = (string) content.GetValueForProperty("NetworkProfilePodCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfilePodCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileServiceCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileServiceCidr = (string) content.GetValueForProperty("NetworkProfileServiceCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileServiceCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDnsServiceIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileDnsServiceIP = (string) content.GetValueForProperty("NetworkProfileDnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileDnsServiceIP, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDockerBridgeCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileDockerBridgeCidr = (string) content.GetValueForProperty("NetworkProfileDockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileDockerBridgeCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerSku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileLoadBalancerSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku?) content.GetValueForProperty("NetworkProfileLoadBalancerSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileLoadBalancerSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku.CreateFrom); - } - if (content.Contains("AadProfileManaged")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileManaged = (bool?) content.GetValueForProperty("AadProfileManaged",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileManaged, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileEnableAzureRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileAdminGroupObjectID")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("AadProfileClientAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileClientAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileServerAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileServerAppSecret = (string) content.GetValueForProperty("AadProfileServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileServerAppSecret, global::System.Convert.ToString); - } - if (content.Contains("AadProfileTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxGracefulTerminationSec")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxGracefulTerminationSec = (string) content.GetValueForProperty("AutoScalerProfileMaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxGracefulTerminationSec, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxTotalUnreadyPercentage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage = (string) content.GetValueForProperty("AutoScalerProfileMaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileNewPodScaleUpDelay")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileNewPodScaleUpDelay = (string) content.GetValueForProperty("AutoScalerProfileNewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileNewPodScaleUpDelay, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileOkTotalUnreadyCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileOkTotalUnreadyCount = (string) content.GetValueForProperty("AutoScalerProfileOkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileOkTotalUnreadyCount, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScanInterval")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScanInterval = (string) content.GetValueForProperty("AutoScalerProfileScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScanInterval, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterAdd")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterAdd = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterAdd, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterDelete = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterFailure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterFailure = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterFailure, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnneededTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnneededTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnneededTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnreadyTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnreadyTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnreadyTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUtilizationThreshold")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUtilizationThreshold = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUtilizationThreshold, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithLocalStorage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithLocalStorage = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithLocalStorage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithSystemPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithSystemPod = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithSystemPod, global::System.Convert.ToString); - } - if (content.Contains("ApiServerAccessProfileAuthorizedIPRange")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileAuthorizedIPRange = (string[]) content.GetValueForProperty("ApiServerAccessProfileAuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileAuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ApiServerAccessProfileEnablePrivateCluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateCluster = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SshPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileManagedOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIPPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileOutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("LoadBalancerProfileOutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileOutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("LoadBalancerProfileOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileEffectiveOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("LoadBalancerProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileAllocatedOutboundPort")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileAllocatedOutboundPort = (int?) content.GetValueForProperty("LoadBalancerProfileAllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileAllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LoadBalancerProfileIdleTimeoutInMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("LoadBalancerProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ManagedOutboundIPCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OutboundIPPrefixPublicIpprefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("OutboundIPPublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - AfterDeserializeDictionary(content); - } - - /// - /// Deserializes a into a new instance of . - /// - /// The global::System.Management.Automation.PSObject content that should be used. - internal ManagedClusterProperties(global::System.Management.Automation.PSObject content) - { - bool returnNow = false; - BeforeDeserializePSObject(content, ref returnNow); - if (returnNow) - { - return; - } - // actually deserialize - if (content.Contains("PowerState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerStateTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile) content.GetValueForProperty("LinuxProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfileTypeConverter.ConvertFrom); - } - if (content.Contains("WindowsProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ServicePrincipalProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile) content.GetValueForProperty("ServicePrincipalProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AadProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfileTypeConverter.ConvertFrom); - } - if (content.Contains("AutoScalerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ApiServerAccessProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile) content.GetValueForProperty("ApiServerAccessProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfileTypeConverter.ConvertFrom); - } - if (content.Contains("ProvisioningState")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); - } - if (content.Contains("MaxAgentPool")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).MaxAgentPool = (int?) content.GetValueForProperty("MaxAgentPool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).MaxAgentPool, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("KubernetesVersion")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); - } - if (content.Contains("DnsPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).DnsPrefix, global::System.Convert.ToString); - } - if (content.Contains("Fqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).Fqdn, global::System.Convert.ToString); - } - if (content.Contains("PrivateFqdn")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PrivateFqdn = (string) content.GetValueForProperty("PrivateFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PrivateFqdn, global::System.Convert.ToString); - } - if (content.Contains("AgentPoolProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileTypeConverter.ConvertFrom)); - } - if (content.Contains("AddonProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AddonProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles) content.GetValueForProperty("AddonProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AddonProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAddonProfilesTypeConverter.ConvertFrom); - } - if (content.Contains("NodeResourceGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NodeResourceGroup = (string) content.GetValueForProperty("NodeResourceGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NodeResourceGroup, global::System.Convert.ToString); - } - if (content.Contains("EnableRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("EnablePodSecurityPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("DiskEncryptionSetId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); - } - if (content.Contains("IdentityProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).IdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile) content.GetValueForProperty("IdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).IdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfileTypeConverter.ConvertFrom); - } - if (content.Contains("PowerStateCode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); - } - if (content.Contains("WindowProfileLicenseType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPlugin")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin?) content.GetValueForProperty("NetworkProfileNetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkPolicy")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy?) content.GetValueForProperty("NetworkProfileNetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy.CreateFrom); - } - if (content.Contains("NetworkProfileNetworkMode")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode?) content.GetValueForProperty("NetworkProfileNetworkMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileNetworkMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode.CreateFrom); - } - if (content.Contains("NetworkProfileOutboundType")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileOutboundType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType?) content.GetValueForProperty("NetworkProfileOutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileOutboundType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType.CreateFrom); - } - if (content.Contains("AutoScalerProfileExpander")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); - } - if (content.Contains("LinuxProfileSsh")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); - } - if (content.Contains("LinuxProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfileAdminUsername = (string) content.GetValueForProperty("LinuxProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LinuxProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminUsername")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileAdminUsername = (string) content.GetValueForProperty("WindowProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileAdminUsername, global::System.Convert.ToString); - } - if (content.Contains("WindowProfileAdminPassword")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileAdminPassword = (string) content.GetValueForProperty("WindowProfileAdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).WindowProfileAdminPassword, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileClientId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileClientId = (string) content.GetValueForProperty("ServicePrincipalProfileClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileClientId, global::System.Convert.ToString); - } - if (content.Contains("ServicePrincipalProfileSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileSecret = (string) content.GetValueForProperty("ServicePrincipalProfileSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileSecret, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerProfile")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileLoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("NetworkProfileLoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileLoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); - } - if (content.Contains("NetworkProfilePodCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfilePodCidr = (string) content.GetValueForProperty("NetworkProfilePodCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfilePodCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileServiceCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileServiceCidr = (string) content.GetValueForProperty("NetworkProfileServiceCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileServiceCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDnsServiceIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileDnsServiceIP = (string) content.GetValueForProperty("NetworkProfileDnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileDnsServiceIP, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileDockerBridgeCidr")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileDockerBridgeCidr = (string) content.GetValueForProperty("NetworkProfileDockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileDockerBridgeCidr, global::System.Convert.ToString); - } - if (content.Contains("NetworkProfileLoadBalancerSku")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileLoadBalancerSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku?) content.GetValueForProperty("NetworkProfileLoadBalancerSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).NetworkProfileLoadBalancerSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku.CreateFrom); - } - if (content.Contains("AadProfileManaged")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileManaged = (bool?) content.GetValueForProperty("AadProfileManaged",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileManaged, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileEnableAzureRbac")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("AadProfileAdminGroupObjectID")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("AadProfileClientAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileClientAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileServerAppId, global::System.Convert.ToString); - } - if (content.Contains("AadProfileServerAppSecret")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileServerAppSecret = (string) content.GetValueForProperty("AadProfileServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileServerAppSecret, global::System.Convert.ToString); - } - if (content.Contains("AadProfileTenantId")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxGracefulTerminationSec")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxGracefulTerminationSec = (string) content.GetValueForProperty("AutoScalerProfileMaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxGracefulTerminationSec, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileMaxTotalUnreadyPercentage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage = (string) content.GetValueForProperty("AutoScalerProfileMaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileNewPodScaleUpDelay")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileNewPodScaleUpDelay = (string) content.GetValueForProperty("AutoScalerProfileNewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileNewPodScaleUpDelay, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileOkTotalUnreadyCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileOkTotalUnreadyCount = (string) content.GetValueForProperty("AutoScalerProfileOkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileOkTotalUnreadyCount, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScanInterval")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScanInterval = (string) content.GetValueForProperty("AutoScalerProfileScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScanInterval, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterAdd")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterAdd = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterAdd, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterDelete")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterDelete = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterDelete, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownDelayAfterFailure")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterFailure = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterFailure, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnneededTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnneededTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnneededTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUnreadyTime")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnreadyTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnreadyTime, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileScaleDownUtilizationThreshold")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUtilizationThreshold = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUtilizationThreshold, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithLocalStorage")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithLocalStorage = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithLocalStorage, global::System.Convert.ToString); - } - if (content.Contains("AutoScalerProfileSkipNodesWithSystemPod")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithSystemPod = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithSystemPod, global::System.Convert.ToString); - } - if (content.Contains("ApiServerAccessProfileAuthorizedIPRange")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileAuthorizedIPRange = (string[]) content.GetValueForProperty("ApiServerAccessProfileAuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileAuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); - } - if (content.Contains("ApiServerAccessProfileEnablePrivateCluster")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateCluster = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); - } - if (content.Contains("SshPublicKey")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileManagedOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIPPrefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileOutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("LoadBalancerProfileOutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileOutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("LoadBalancerProfileOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); - } - if (content.Contains("LoadBalancerProfileEffectiveOutboundIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("LoadBalancerProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("LoadBalancerProfileAllocatedOutboundPort")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileAllocatedOutboundPort = (int?) content.GetValueForProperty("LoadBalancerProfileAllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileAllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("LoadBalancerProfileIdleTimeoutInMinute")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("LoadBalancerProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).LoadBalancerProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("ManagedOutboundIPCount")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); - } - if (content.Contains("OutboundIPPrefixPublicIpprefix")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); - } - if (content.Contains("OutboundIPPublicIP")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.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(); - } - /// Properties of the managed cluster. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterPropertiesTypeConverter))] - public partial interface IManagedClusterProperties - - { - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.cs deleted file mode 100644 index 31880850caee..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.cs +++ /dev/null @@ -1,1162 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Properties of the managed cluster. - public partial class ManagedClusterProperties : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal - { - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile _aadProfile; - - /// Profile of Azure Active Directory configuration. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfile()); set => this._aadProfile = value; } - - /// AAD group object IDs that will have admin role of the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string[] AadProfileAdminGroupObjectID { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).AdminGroupObjectID; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).AdminGroupObjectID = value ?? null /* arrayOf */; } - - /// The client AAD application ID. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AadProfileClientAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).ClientAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).ClientAppId = value ?? null; } - - /// Whether to enable Azure RBAC for Kubernetes authorization. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool? AadProfileEnableAzureRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).EnableAzureRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).EnableAzureRbac = value ?? default(bool); } - - /// Whether to enable managed AAD. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool? AadProfileManaged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).Managed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).Managed = value ?? default(bool); } - - /// The server AAD application ID. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AadProfileServerAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).ServerAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).ServerAppId = value ?? null; } - - /// The server AAD application secret. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AadProfileServerAppSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).ServerAppSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).ServerAppSecret = value ?? null; } - - /// - /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)AadProfile).TenantId = value ?? null; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles _addonProfile; - - /// Profile of managed cluster add-on. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles AddonProfile { get => (this._addonProfile = this._addonProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAddonProfiles()); set => this._addonProfile = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[] _agentPoolProfile; - - /// Properties of the agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get => this._agentPoolProfile; set => this._agentPoolProfile = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile _apiServerAccessProfile; - - /// Access profile for managed cluster API server. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile ApiServerAccessProfile { get => (this._apiServerAccessProfile = this._apiServerAccessProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfile()); set => this._apiServerAccessProfile = value; } - - /// Authorized IP Ranges to kubernetes API server. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string[] ApiServerAccessProfileAuthorizedIPRange { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).AuthorizedIPRange; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).AuthorizedIPRange = value ?? null /* arrayOf */; } - - /// Whether to create the cluster as a private cluster or not. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public bool? ApiServerAccessProfileEnablePrivateCluster { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnablePrivateCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnablePrivateCluster = value ?? default(bool); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile _autoScalerProfile; - - /// Parameters to be applied to the cluster-autoscaler when enabled - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get => (this._autoScalerProfile = this._autoScalerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfile()); set => this._autoScalerProfile = value; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileBalanceSimilarNodeGroup { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).BalanceSimilarNodeGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).BalanceSimilarNodeGroup = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).Expander; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).Expander = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander)""); } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileMaxEmptyBulkDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxEmptyBulkDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxEmptyBulkDelete = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileMaxGracefulTerminationSec { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxGracefulTerminationSec; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxGracefulTerminationSec = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileMaxTotalUnreadyPercentage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxTotalUnreadyPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxTotalUnreadyPercentage = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileNewPodScaleUpDelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).NewPodScaleUpDelay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).NewPodScaleUpDelay = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileOkTotalUnreadyCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).OkTotalUnreadyCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).OkTotalUnreadyCount = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownDelayAfterAdd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterAdd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterAdd = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownDelayAfterDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterDelete = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownDelayAfterFailure { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterFailure; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterFailure = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownUnneededTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnneededTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnneededTime = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownUnreadyTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnreadyTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnreadyTime = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScaleDownUtilizationThreshold { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUtilizationThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUtilizationThreshold = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileScanInterval { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScanInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScanInterval = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileSkipNodesWithLocalStorage { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithLocalStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithLocalStorage = value ?? null; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string AutoScalerProfileSkipNodesWithSystemPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithSystemPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithSystemPod = value ?? null; } - - /// Backing field for property. - private string _diskEncryptionSetId; - - /// ResourceId of the disk encryption set to use for enabling encryption at rest. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string DiskEncryptionSetId { get => this._diskEncryptionSetId; set => this._diskEncryptionSetId = value; } - - /// Backing field for property. - private string _dnsPrefix; - - /// DNS prefix specified when creating the managed cluster. - [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; - - /// - /// (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, - /// 2020. Learn more at aka.ms/aks/azpodpolicy. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public bool? EnablePodSecurityPolicy { get => this._enablePodSecurityPolicy; set => this._enablePodSecurityPolicy = value; } - - /// Backing field for property. - private bool? _enableRbac; - - /// Whether to enable Kubernetes Role-Based Access Control. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public bool? EnableRbac { get => this._enableRbac; set => this._enableRbac = value; } - - /// Backing field for property. - private string _fqdn; - - /// FQDN for the master pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Fqdn { get => this._fqdn; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile _identityProfile; - - /// Identities associated with the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile IdentityProfile { get => (this._identityProfile = this._identityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfile()); set => this._identityProfile = value; } - - /// Backing field for property. - private string _kubernetesVersion; - - /// Version of Kubernetes specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string KubernetesVersion { get => this._kubernetesVersion; set => this._kubernetesVersion = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile _linuxProfile; - - /// Profile for Linux VMs in the container service cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile LinuxProfile { get => (this._linuxProfile = this._linuxProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfile()); set => this._linuxProfile = value; } - - /// The administrator username to use for Linux VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string LinuxProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)LinuxProfile).AdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)LinuxProfile).AdminUsername = value ?? null; } - - /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? LoadBalancerProfileAllocatedOutboundPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileAllocatedOutboundPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileAllocatedOutboundPort = value ?? default(int); } - - /// The effective outbound IP resources of the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileEffectiveOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileEffectiveOutboundIP = value ?? null /* arrayOf */; } - - /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? LoadBalancerProfileIdleTimeoutInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileIdleTimeoutInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileIdleTimeoutInMinute = value ?? default(int); } - - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? ManagedOutboundIPCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).ManagedOutboundIPCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).ManagedOutboundIPCount = value ?? default(int); } - - /// Backing field for property. - private int? _maxAgentPool; - - /// The max number of agent pools for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public int? MaxAgentPool { get => this._maxAgentPool; } - - /// Internal Acessors for AadProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfile()); set { {_aadProfile = value;} } } - - /// Internal Acessors for ApiServerAccessProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.ApiServerAccessProfile { get => (this._apiServerAccessProfile = this._apiServerAccessProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfile()); set { {_apiServerAccessProfile = value;} } } - - /// Internal Acessors for AutoScalerProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.AutoScalerProfile { get => (this._autoScalerProfile = this._autoScalerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfile()); set { {_autoScalerProfile = value;} } } - - /// Internal Acessors for Fqdn - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.Fqdn { get => this._fqdn; set { {_fqdn = value;} } } - - /// Internal Acessors for LinuxProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.LinuxProfile { get => (this._linuxProfile = this._linuxProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfile()); set { {_linuxProfile = value;} } } - - /// Internal Acessors for LinuxProfileSsh - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.LinuxProfileSsh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)LinuxProfile).Ssh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)LinuxProfile).Ssh = value; } - - /// Internal Acessors for LoadBalancerProfileManagedOutboundIP - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.LoadBalancerProfileManagedOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileManagedOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileManagedOutboundIP = value; } - - /// Internal Acessors for LoadBalancerProfileOutboundIP - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.LoadBalancerProfileOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileOutboundIP = value; } - - /// Internal Acessors for LoadBalancerProfileOutboundIPPrefix - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.LoadBalancerProfileOutboundIPPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileOutboundIPPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfileOutboundIPPrefix = value; } - - /// Internal Acessors for MaxAgentPool - int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.MaxAgentPool { get => this._maxAgentPool; set { {_maxAgentPool = value;} } } - - /// Internal Acessors for NetworkProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.NetworkProfile { get => (this._networkProfile = this._networkProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfile()); set { {_networkProfile = value;} } } - - /// Internal Acessors for NetworkProfileLoadBalancerProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.NetworkProfileLoadBalancerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerProfile = value; } - - /// Internal Acessors for PowerState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerState()); set { {_powerState = value;} } } - - /// Internal Acessors for PrivateFqdn - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.PrivateFqdn { get => this._privateFqdn; set { {_privateFqdn = value;} } } - - /// Internal Acessors for ProvisioningState - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } - - /// Internal Acessors for ServicePrincipalProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.ServicePrincipalProfile { get => (this._servicePrincipalProfile = this._servicePrincipalProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfile()); set { {_servicePrincipalProfile = value;} } } - - /// Internal Acessors for WindowsProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesInternal.WindowsProfile { get => (this._windowsProfile = this._windowsProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfile()); set { {_windowsProfile = value;} } } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile _networkProfile; - - /// Profile of network configuration. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile NetworkProfile { get => (this._networkProfile = this._networkProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfile()); set => this._networkProfile = value; } - - /// - /// 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.Inlined)] - public string NetworkProfileDnsServiceIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).DnsServiceIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).DnsServiceIP = value ?? null; } - - /// - /// 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string NetworkProfileDockerBridgeCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).DockerBridgeCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).DockerBridgeCidr = value ?? null; } - - /// The load balancer sku for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? NetworkProfileLoadBalancerSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).LoadBalancerSku = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku)""); } - - /// Network mode used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkProfileNetworkMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).NetworkMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).NetworkMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode)""); } - - /// Network plugin used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkProfileNetworkPlugin { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).NetworkPlugin; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).NetworkPlugin = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin)""); } - - /// Network policy used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkProfileNetworkPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).NetworkPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).NetworkPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy)""); } - - /// The outbound (egress) routing method. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? NetworkProfileOutboundType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).OutboundType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).OutboundType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType)""); } - - /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string NetworkProfilePodCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).PodCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).PodCidr = value ?? null; } - - /// - /// 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.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string NetworkProfileServiceCidr { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).ServiceCidr; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).ServiceCidr = value ?? null; } - - /// Backing field for property. - private string _nodeResourceGroup; - - /// Name of the resource group containing agent pool nodes. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string NodeResourceGroup { get => this._nodeResourceGroup; set => this._nodeResourceGroup = value; } - - /// A list of public IP prefix resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).OutboundIPPrefixPublicIpprefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).OutboundIPPrefixPublicIpprefix = value ?? null /* arrayOf */; } - - /// A list of public IP resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).OutboundIPPublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)NetworkProfile).OutboundIPPublicIP = value ?? null /* arrayOf */; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState _powerState; - - /// Represents the Power State of the cluster - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerState()); } - - /// Tells whether the cluster is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerStateInternal)PowerState).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerStateInternal)PowerState).Code = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } - - /// Backing field for property. - private string _privateFqdn; - - /// FQDN of private cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string PrivateFqdn { get => this._privateFqdn; } - - /// Backing field for property. - private string _provisioningState; - - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string ProvisioningState { get => this._provisioningState; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile _servicePrincipalProfile; - - /// - /// Information about a service principal identity for the cluster to use for manipulating Azure APIs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile ServicePrincipalProfile { get => (this._servicePrincipalProfile = this._servicePrincipalProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfile()); set => this._servicePrincipalProfile = value; } - - /// 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.Api20200901.IManagedClusterServicePrincipalProfileInternal)ServicePrincipalProfile).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)ServicePrincipalProfile).ClientId = value ?? null; } - - /// The secret password associated with the service principal in plain text. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string ServicePrincipalProfileSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)ServicePrincipalProfile).Secret; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)ServicePrincipalProfile).Secret = value ?? null; } - - /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)LinuxProfile).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)LinuxProfile).SshPublicKey = value ?? null /* arrayOf */; } - - /// - /// 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:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string WindowProfileAdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)WindowsProfile).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)WindowsProfile).AdminPassword = value ?? null; } - - /// - /// Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string WindowProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)WindowsProfile).AdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)WindowsProfile).AdminUsername = value ?? null; } - - /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)WindowsProfile).LicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)WindowsProfile).LicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType)""); } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile _windowsProfile; - - /// Profile for Windows VMs in the container service cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile WindowsProfile { get => (this._windowsProfile = this._windowsProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfile()); set => this._windowsProfile = value; } - - /// Creates an new instance. - public ManagedClusterProperties() - { - - } - } - /// Properties of the managed cluster. - public partial interface IManagedClusterProperties : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// AAD group object IDs that will have admin role of the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"AAD group object IDs that will have admin role of the cluster.", - SerializedName = @"adminGroupObjectIDs", - PossibleTypes = new [] { typeof(string) })] - string[] AadProfileAdminGroupObjectID { get; set; } - /// The client AAD application ID. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The client AAD application ID.", - SerializedName = @"clientAppID", - PossibleTypes = new [] { typeof(string) })] - string AadProfileClientAppId { get; set; } - /// Whether to enable Azure RBAC for Kubernetes authorization. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether to enable Azure RBAC for Kubernetes authorization.", - SerializedName = @"enableAzureRBAC", - PossibleTypes = new [] { typeof(bool) })] - bool? AadProfileEnableAzureRbac { get; set; } - /// Whether to enable managed AAD. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether to enable managed AAD.", - SerializedName = @"managed", - PossibleTypes = new [] { typeof(bool) })] - bool? AadProfileManaged { get; set; } - /// The server AAD application ID. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The server AAD application ID.", - SerializedName = @"serverAppID", - PossibleTypes = new [] { typeof(string) })] - string AadProfileServerAppId { get; set; } - /// The server AAD application secret. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The server AAD application secret.", - SerializedName = @"serverAppSecret", - PossibleTypes = new [] { typeof(string) })] - string AadProfileServerAppSecret { get; set; } - /// - /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.", - SerializedName = @"tenantID", - PossibleTypes = new [] { typeof(string) })] - string AadProfileTenantId { get; set; } - /// Profile of managed cluster add-on. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Profile of managed cluster add-on.", - SerializedName = @"addonProfiles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles AddonProfile { get; set; } - /// Properties of the agent pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Properties of the agent pool.", - SerializedName = @"agentPoolProfiles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get; set; } - /// Authorized IP Ranges to kubernetes API server. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Authorized IP Ranges to kubernetes API server.", - SerializedName = @"authorizedIPRanges", - PossibleTypes = new [] { typeof(string) })] - string[] ApiServerAccessProfileAuthorizedIPRange { get; set; } - /// Whether to create the cluster as a private cluster or not. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Whether to create the cluster as a private cluster or not.", - SerializedName = @"enablePrivateCluster", - PossibleTypes = new [] { typeof(bool) })] - bool? ApiServerAccessProfileEnablePrivateCluster { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"balance-similar-node-groups", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileBalanceSimilarNodeGroup { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"expander", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"max-empty-bulk-delete", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileMaxEmptyBulkDelete { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"max-graceful-termination-sec", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileMaxGracefulTerminationSec { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"max-total-unready-percentage", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileMaxTotalUnreadyPercentage { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"new-pod-scale-up-delay", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileNewPodScaleUpDelay { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"ok-total-unready-count", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileOkTotalUnreadyCount { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-delay-after-add", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownDelayAfterAdd { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-delay-after-delete", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownDelayAfterDelete { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-delay-after-failure", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownDelayAfterFailure { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-unneeded-time", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownUnneededTime { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-unready-time", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownUnreadyTime { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scale-down-utilization-threshold", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScaleDownUtilizationThreshold { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"scan-interval", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileScanInterval { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"skip-nodes-with-local-storage", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileSkipNodesWithLocalStorage { get; set; } - - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"", - SerializedName = @"skip-nodes-with-system-pods", - PossibleTypes = new [] { typeof(string) })] - string AutoScalerProfileSkipNodesWithSystemPod { get; set; } - /// ResourceId of the disk encryption set to use for enabling encryption at rest. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"ResourceId of the disk encryption set to use for enabling encryption at rest.", - SerializedName = @"diskEncryptionSetID", - PossibleTypes = new [] { typeof(string) })] - string DiskEncryptionSetId { get; set; } - /// DNS prefix specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"DNS prefix specified when creating the managed cluster.", - SerializedName = @"dnsPrefix", - PossibleTypes = new [] { typeof(string) })] - string DnsPrefix { get; set; } - /// - /// (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, - /// 2020. Learn more at aka.ms/aks/azpodpolicy. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"(DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, 2020. Learn more at aka.ms/aks/azpodpolicy.", - 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, - ReadOnly = false, - Description = @"Whether to enable Kubernetes Role-Based Access Control.", - SerializedName = @"enableRBAC", - PossibleTypes = new [] { typeof(bool) })] - bool? EnableRbac { get; set; } - /// FQDN for the master pool. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"FQDN for the master pool.", - SerializedName = @"fqdn", - PossibleTypes = new [] { typeof(string) })] - string Fqdn { get; } - /// Identities associated with the cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Identities associated with the cluster.", - SerializedName = @"identityProfile", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } - /// Version of Kubernetes specified when creating the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Version of Kubernetes specified when creating the managed cluster.", - SerializedName = @"kubernetesVersion", - PossibleTypes = new [] { typeof(string) })] - string KubernetesVersion { get; set; } - /// The administrator username to use for Linux VMs. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The administrator username to use for Linux VMs.", - SerializedName = @"adminUsername", - PossibleTypes = new [] { typeof(string) })] - string LinuxProfileAdminUsername { get; set; } - /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports.", - SerializedName = @"allocatedOutboundPorts", - PossibleTypes = new [] { typeof(int) })] - int? LoadBalancerProfileAllocatedOutboundPort { get; set; } - /// The effective outbound IP resources of the cluster load balancer. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The effective outbound IP resources of the cluster load balancer.", - SerializedName = @"effectiveOutboundIPs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get; set; } - /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes.", - SerializedName = @"idleTimeoutInMinutes", - PossibleTypes = new [] { typeof(int) })] - int? LoadBalancerProfileIdleTimeoutInMinute { get; set; } - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ", - SerializedName = @"count", - PossibleTypes = new [] { typeof(int) })] - int? ManagedOutboundIPCount { get; set; } - /// The max number of agent pools for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The max number of agent pools for the managed cluster.", - SerializedName = @"maxAgentPools", - PossibleTypes = new [] { typeof(int) })] - int? MaxAgentPool { get; } - /// - /// 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, - ReadOnly = false, - 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 NetworkProfileDnsServiceIP { 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. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - 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", - PossibleTypes = new [] { typeof(string) })] - string NetworkProfileDockerBridgeCidr { get; set; } - /// The load balancer sku for the managed cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The load balancer sku for the managed cluster.", - SerializedName = @"loadBalancerSku", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? NetworkProfileLoadBalancerSku { get; set; } - /// Network mode used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Network mode used for building Kubernetes network.", - SerializedName = @"networkMode", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkProfileNetworkMode { get; set; } - /// Network plugin used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Network plugin used for building Kubernetes network.", - SerializedName = @"networkPlugin", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkProfileNetworkPlugin { get; set; } - /// Network policy used for building Kubernetes network. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Network policy used for building Kubernetes network.", - SerializedName = @"networkPolicy", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkProfileNetworkPolicy { get; set; } - /// The outbound (egress) routing method. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The outbound (egress) routing method.", - SerializedName = @"outboundType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? NetworkProfileOutboundType { get; set; } - /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A CIDR notation IP range from which to assign pod IPs when kubenet is used.", - SerializedName = @"podCidr", - PossibleTypes = new [] { typeof(string) })] - string NetworkProfilePodCidr { 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( - Required = false, - ReadOnly = false, - Description = @"A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.", - SerializedName = @"serviceCidr", - PossibleTypes = new [] { typeof(string) })] - string NetworkProfileServiceCidr { get; set; } - /// Name of the resource group containing agent pool nodes. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Name of the resource group containing agent pool nodes.", - SerializedName = @"nodeResourceGroup", - PossibleTypes = new [] { typeof(string) })] - string NodeResourceGroup { get; set; } - /// A list of public IP prefix resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of public IP prefix resources.", - SerializedName = @"publicIPPrefixes", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } - /// A list of public IP resources. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"A list of public IP resources.", - SerializedName = @"publicIPs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get; set; } - /// Tells whether the cluster is Running or Stopped - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Tells whether the cluster is Running or Stopped", - SerializedName = @"code", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } - /// FQDN of private cluster. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"FQDN of private cluster.", - SerializedName = @"privateFQDN", - PossibleTypes = new [] { typeof(string) })] - string PrivateFqdn { get; } - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"The current deployment or provisioning state, which only appears in the response.", - SerializedName = @"provisioningState", - PossibleTypes = new [] { typeof(string) })] - string ProvisioningState { get; } - /// The ID for the service principal. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The ID for the service principal.", - SerializedName = @"clientId", - PossibleTypes = new [] { typeof(string) })] - string ServicePrincipalProfileClientId { get; set; } - /// The secret password associated with the service principal in plain text. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The secret password associated with the service principal in plain text.", - SerializedName = @"secret", - PossibleTypes = new [] { typeof(string) })] - string ServicePrincipalProfileSecret { get; set; } - /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified.", - SerializedName = @"publicKeys", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] SshPublicKey { 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:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"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:** ""abc@123"", ""P@$$w0rd"", ""P@ssw0rd"", ""P@ssword123"", ""Pa$$word"", ""pass@word1"", ""Password!"", ""Password1"", ""Password22"", ""iloveyou!""", - SerializedName = @"adminPassword", - PossibleTypes = new [] { typeof(string) })] - string WindowProfileAdminPassword { get; set; } - /// - /// Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Specifies the name of the administrator account.

**restriction:** Cannot end in "".""

**Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

**Minimum-length:** 1 character

**Max-length:** 20 characters", - SerializedName = @"adminUsername", - PossibleTypes = new [] { typeof(string) })] - string WindowProfileAdminUsername { get; set; } - /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs.", - SerializedName = @"licenseType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get; set; } - - } - /// Properties of the managed cluster. - internal partial interface IManagedClusterPropertiesInternal - - { - /// Profile of Azure Active Directory configuration. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile AadProfile { get; set; } - /// AAD group object IDs that will have admin role of the cluster. - string[] AadProfileAdminGroupObjectID { get; set; } - /// The client AAD application ID. - string AadProfileClientAppId { get; set; } - /// Whether to enable Azure RBAC for Kubernetes authorization. - bool? AadProfileEnableAzureRbac { get; set; } - /// Whether to enable managed AAD. - bool? AadProfileManaged { get; set; } - /// The server AAD application ID. - string AadProfileServerAppId { get; set; } - /// The server AAD application secret. - string AadProfileServerAppSecret { get; set; } - /// - /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. - /// - string AadProfileTenantId { get; set; } - /// Profile of managed cluster add-on. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles AddonProfile { get; set; } - /// Properties of the agent pool. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get; set; } - /// Access profile for managed cluster API server. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile ApiServerAccessProfile { get; set; } - /// Authorized IP Ranges to kubernetes API server. - string[] ApiServerAccessProfileAuthorizedIPRange { get; set; } - /// Whether to create the cluster as a private cluster or not. - bool? ApiServerAccessProfileEnablePrivateCluster { get; set; } - /// Parameters to be applied to the cluster-autoscaler when enabled - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get; set; } - - string AutoScalerProfileBalanceSimilarNodeGroup { get; set; } - - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get; set; } - - string AutoScalerProfileMaxEmptyBulkDelete { get; set; } - - string AutoScalerProfileMaxGracefulTerminationSec { get; set; } - - string AutoScalerProfileMaxTotalUnreadyPercentage { get; set; } - - string AutoScalerProfileNewPodScaleUpDelay { get; set; } - - string AutoScalerProfileOkTotalUnreadyCount { get; set; } - - string AutoScalerProfileScaleDownDelayAfterAdd { get; set; } - - string AutoScalerProfileScaleDownDelayAfterDelete { get; set; } - - string AutoScalerProfileScaleDownDelayAfterFailure { get; set; } - - string AutoScalerProfileScaleDownUnneededTime { get; set; } - - string AutoScalerProfileScaleDownUnreadyTime { get; set; } - - string AutoScalerProfileScaleDownUtilizationThreshold { get; set; } - - string AutoScalerProfileScanInterval { get; set; } - - string AutoScalerProfileSkipNodesWithLocalStorage { get; set; } - - string AutoScalerProfileSkipNodesWithSystemPod { get; set; } - /// ResourceId of the disk encryption set to use for enabling encryption at rest. - string DiskEncryptionSetId { get; set; } - /// DNS prefix specified when creating the managed cluster. - string DnsPrefix { get; set; } - /// - /// (DEPRECATING) Whether to enable Kubernetes pod security policy (preview). This feature is set for removal on October 15th, - /// 2020. Learn more at aka.ms/aks/azpodpolicy. - /// - bool? EnablePodSecurityPolicy { get; set; } - /// Whether to enable Kubernetes Role-Based Access Control. - bool? EnableRbac { get; set; } - /// FQDN for the master pool. - string Fqdn { get; set; } - /// Identities associated with the cluster. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } - /// Version of Kubernetes specified when creating the managed cluster. - string KubernetesVersion { get; set; } - /// Profile for Linux VMs in the container service cluster. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile LinuxProfile { get; set; } - /// The administrator username to use for Linux VMs. - string LinuxProfileAdminUsername { get; set; } - /// SSH configuration for Linux-based VMs running on Azure. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration LinuxProfileSsh { get; set; } - /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default - /// value is 0 which results in Azure dynamically allocating ports. - /// - int? LoadBalancerProfileAllocatedOutboundPort { get; set; } - /// The effective outbound IP resources of the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get; set; } - /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. - /// - int? LoadBalancerProfileIdleTimeoutInMinute { get; set; } - /// Desired managed outbound IPs for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs LoadBalancerProfileManagedOutboundIP { get; set; } - /// Desired outbound IP resources for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs LoadBalancerProfileOutboundIP { get; set; } - /// Desired outbound IP Prefix resources for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes LoadBalancerProfileOutboundIPPrefix { get; set; } - /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. - /// - int? ManagedOutboundIPCount { get; set; } - /// The max number of agent pools for the managed cluster. - int? MaxAgentPool { get; set; } - /// Profile of network configuration. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile NetworkProfile { get; set; } - /// - /// An IP address assigned to the Kubernetes DNS service. It must be within the Kubernetes service address range specified - /// in serviceCidr. - /// - string NetworkProfileDnsServiceIP { 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 NetworkProfileDockerBridgeCidr { get; set; } - /// Profile of the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile NetworkProfileLoadBalancerProfile { get; set; } - /// The load balancer sku for the managed cluster. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? NetworkProfileLoadBalancerSku { get; set; } - /// Network mode used for building Kubernetes network. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkProfileNetworkMode { get; set; } - /// Network plugin used for building Kubernetes network. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkProfileNetworkPlugin { get; set; } - /// Network policy used for building Kubernetes network. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkProfileNetworkPolicy { get; set; } - /// The outbound (egress) routing method. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? NetworkProfileOutboundType { get; set; } - /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. - string NetworkProfilePodCidr { get; set; } - /// - /// A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges. - /// - string NetworkProfileServiceCidr { get; set; } - /// Name of the resource group containing agent pool nodes. - string NodeResourceGroup { get; set; } - /// A list of public IP prefix resources. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } - /// A list of public IP resources. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get; set; } - /// Represents the Power State of the cluster - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState PowerState { get; set; } - /// Tells whether the cluster is Running or Stopped - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } - /// FQDN of private cluster. - string PrivateFqdn { get; set; } - /// - /// The current deployment or provisioning state, which only appears in the response. - /// - string ProvisioningState { get; set; } - /// - /// Information about a service principal identity for the cluster to use for manipulating Azure APIs. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile ServicePrincipalProfile { get; set; } - /// The ID for the service principal. - string ServicePrincipalProfileClientId { get; set; } - /// The secret password associated with the service principal in plain text. - string ServicePrincipalProfileSecret { get; set; } - /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] SshPublicKey { 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:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - ///
- string WindowProfileAdminPassword { get; set; } - /// - /// Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters - ///
- string WindowProfileAdminUsername { get; set; } - /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get; set; } - /// Profile for Windows VMs in the container service cluster. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile WindowsProfile { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.cs deleted file mode 100644 index 16f90f79e5bd..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.cs +++ /dev/null @@ -1,64 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - public partial class ManagedClusterPropertiesIdentityProfileValue : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfileValue, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfileValueInternal, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates - { - /// - /// Backing field for Inherited model - /// - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity __userAssignedIdentity = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentity(); - - /// The client id of the user assigned identity. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ClientId = value ?? null; } - - /// The object id of the user assigned identity. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ObjectId = value ?? null; } - - /// The resource id of the user assigned identity. - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ResourceId = value ?? null; } - - /// - /// Creates an new instance. - /// - public ManagedClusterPropertiesIdentityProfileValue() - { - - } - - /// 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(__userAssignedIdentity), __userAssignedIdentity); - await eventListener.AssertObjectIsValid(nameof(__userAssignedIdentity), __userAssignedIdentity); - } - } - public partial interface IManagedClusterPropertiesIdentityProfileValue : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity - { - - } - internal partial interface IManagedClusterPropertiesIdentityProfileValueInternal : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal - { - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.cs deleted file mode 100644 index 9019203fe527..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.cs +++ /dev/null @@ -1,121 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Profile for Windows VMs in the container service cluster. - public partial class ManagedClusterWindowsProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal - { - - /// Backing field for property. - private string _adminPassword; - - /// - /// 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:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string AdminPassword { get => this._adminPassword; set => this._adminPassword = value; } - - /// Backing field for property. - private string _adminUsername; - - /// - /// Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string AdminUsername { get => this._adminUsername; set => this._adminUsername = value; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? _licenseType; - - /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? LicenseType { get => this._licenseType; set => this._licenseType = value; } - - /// Creates an new instance. - public ManagedClusterWindowsProfile() - { - - } - } - /// Profile for Windows VMs in the container service cluster. - public partial interface IManagedClusterWindowsProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// - /// 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:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"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:** ""abc@123"", ""P@$$w0rd"", ""P@ssw0rd"", ""P@ssword123"", ""Pa$$word"", ""pass@word1"", ""Password!"", ""Password1"", ""Password22"", ""iloveyou!""", - SerializedName = @"adminPassword", - PossibleTypes = new [] { typeof(string) })] - string AdminPassword { get; set; } - /// - /// Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters - ///
- [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Specifies the name of the administrator account.

**restriction:** Cannot end in "".""

**Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

**Minimum-length:** 1 character

**Max-length:** 20 characters", - SerializedName = @"adminUsername", - PossibleTypes = new [] { typeof(string) })] - string AdminUsername { get; set; } - /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. - /// - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs.", - SerializedName = @"licenseType", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? LicenseType { get; set; } - - } - /// Profile for Windows VMs in the container service cluster. - internal partial interface IManagedClusterWindowsProfileInternal - - { - /// - /// 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:** - /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" - ///
- string AdminPassword { get; set; } - /// - /// Specifies the name of the administrator account.

**restriction:** Cannot end in "."

**Disallowed values:** - /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", - /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", - /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters - ///
- string AdminUsername { get; set; } - /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. - /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? LicenseType { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.cs deleted file mode 100644 index 4c860b80dfa9..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.cs +++ /dev/null @@ -1,128 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// The Resource model definition. - public partial class Resource : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResource, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal - { - - /// Backing field for property. - private string _id; - - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Id { get => this._id; } - - /// Backing field for property. - private string _location; - - /// Resource location - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Location { get => this._location; set => this._location = value; } - - /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal.Id { get => this._id; set { {_id = value;} } } - - /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal.Name { get => this._name; set { {_name = value;} } } - - /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal.Type { get => this._type; set { {_type = value;} } } - - /// Backing field for property. - private string _name; - - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public string Name { get => this._name; } - - /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags _tag; - - /// Resource tags - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTags()); set => this._tag = value; } - - /// Backing field for property. - private string _type; - - /// Resource 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 Resource() - { - - } - } - /// The Resource model definition. - public partial interface IResource : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable - { - /// Resource Id - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource Id", - SerializedName = @"id", - PossibleTypes = new [] { typeof(string) })] - string Id { get; } - /// Resource location - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = true, - ReadOnly = false, - Description = @"Resource location", - SerializedName = @"location", - PossibleTypes = new [] { typeof(string) })] - string Location { get; set; } - /// Resource name - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource name", - SerializedName = @"name", - PossibleTypes = new [] { typeof(string) })] - string Name { get; } - /// Resource tags - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = false, - Description = @"Resource tags", - SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags Tag { get; set; } - /// Resource type - [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( - Required = false, - ReadOnly = true, - Description = @"Resource type", - SerializedName = @"type", - PossibleTypes = new [] { typeof(string) })] - string Type { get; } - - } - /// The Resource model definition. - internal partial interface IResourceInternal - - { - /// Resource Id - string Id { get; set; } - /// Resource location - string Location { get; set; } - /// Resource name - string Name { get; set; } - /// Resource tags - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags Tag { get; set; } - /// Resource type - string Type { get; set; } - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.cs deleted file mode 100644 index 5fa529063a4d..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.cs +++ /dev/null @@ -1,35 +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.Api20200901 -{ - using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - - /// Resource tags - public partial class ResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTagsInternal - { - - /// Creates an new instance. - public ResourceTags() - { - - } - } - /// Resource tags - public partial interface IResourceTags : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray - { - - } - /// Resource tags - internal partial interface IResourceTagsInternal - - { - - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.PowerShell.cs similarity index 89% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.PowerShell.cs index 9a72be594b55..03ec12c57037 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AccessProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,13 +70,13 @@ internal AccessProfile(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("KubeConfig")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfileInternal)this).KubeConfig = (byte[]) content.GetValueForProperty("KubeConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfileInternal)this).KubeConfig, i => i); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfileInternal)this).KubeConfig = (byte[]) content.GetValueForProperty("KubeConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfileInternal)this).KubeConfig, i => i); } 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. @@ -91,33 +91,33 @@ internal AccessProfile(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("KubeConfig")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfileInternal)this).KubeConfig = (byte[]) content.GetValueForProperty("KubeConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfileInternal)this).KubeConfig, i => i); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfileInternal)this).KubeConfig = (byte[]) content.GetValueForProperty("KubeConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfileInternal)this).KubeConfig, i => i); } 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.Api20200901.IAccessProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AccessProfile(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.Api20200901.IAccessProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AccessProfile(content); } @@ -127,7 +127,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessP ///
/// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.TypeConverter.cs index b1e35c348a17..f2441f1902e0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.cs similarity index 90% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.cs index 6e5fd3127eba..fc9a6f64d30a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Profile for enabling a user to access a managed cluster. public partial class AccessProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfileInternal { /// Backing field for property. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.json.cs index 2fc8708690c0..ee49da213721 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AccessProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AccessProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -70,13 +70,13 @@ internal AccessProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonO } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AccessProfile(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.PowerShell.cs new file mode 100644 index 000000000000..d799047acf51 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.PowerShell.cs @@ -0,0 +1,648 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Agent Pool. + [System.ComponentModel.TypeConverter(typeof(AgentPoolTypeConverter))] + public partial class AgentPool + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal AgentPool(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.Api20230201.IAgentPoolInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerStateTypeConverter.ConvertFrom); + } + if (content.Contains("KubeletConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig) content.GetValueForProperty("KubeletConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationDataTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadRuntime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).WorkloadRuntime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime?) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).WorkloadRuntime, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime.CreateFrom); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + } + if (content.Contains("UpgradeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxOSConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig) content.GetValueForProperty("LinuxOSConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfigTypeConverter.ConvertFrom); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).VMSize = (string) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).VMSize, global::System.Convert.ToString); + } + if (content.Contains("OSDiskSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); + } + if (content.Contains("KubeletDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType?) content.GetValueForProperty("KubeletDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType.CreateFrom); + } + if (content.Contains("VnetSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).VnetSubnetId, global::System.Convert.ToString); + } + if (content.Contains("PodSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PodSubnetId, global::System.Convert.ToString); + } + if (content.Contains("MaxPod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku?) content.GetValueForProperty("OSSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku.CreateFrom); + } + if (content.Contains("MaxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnableAutoScaling")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScaleDownMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleDownMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode?) content.GetValueForProperty("ScaleDownMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleDownMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode.CreateFrom); + } + if (content.Contains("PropertiesType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PropertiesType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PropertiesType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); + } + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); + } + if (content.Contains("OrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("CurrentOrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CurrentOrchestratorVersion = (string) content.GetValueForProperty("CurrentOrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CurrentOrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("NodeImageVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeImageVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("EnableNodePublicIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NodePublicIPPrefixId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodePublicIPPrefixId = (string) content.GetValueForProperty("NodePublicIPPrefixId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodePublicIPPrefixId, global::System.Convert.ToString); + } + if (content.Contains("ScaleSetPriority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); + } + if (content.Contains("ScaleSetEvictionPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); + } + if (content.Contains("SpotMaxPrice")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeTaint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ProximityPlacementGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ProximityPlacementGroupId, global::System.Convert.ToString); + } + if (content.Contains("EnableEncryptionAtHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableEncryptionAtHost = (bool?) content.GetValueForProperty("EnableEncryptionAtHost",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableEncryptionAtHost, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableUltraSsd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableUltraSsd = (bool?) content.GetValueForProperty("EnableUltraSsd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableUltraSsd, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableFips")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableFips = (bool?) content.GetValueForProperty("EnableFips",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableFips, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GpuInstanceProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).GpuInstanceProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile?) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).GpuInstanceProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile.CreateFrom); + } + if (content.Contains("HostGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).HostGroupId, global::System.Convert.ToString); + } + if (content.Contains("PowerStateCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + } + if (content.Contains("UpgradeSettingMaxSurge")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuCfsQuota")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuCfsQuota = (bool?) content.GetValueForProperty("KubeletConfigCpuCfsQuota",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuCfsQuota, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigCpuCfsQuotaPeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuCfsQuotaPeriod = (string) content.GetValueForProperty("KubeletConfigCpuCfsQuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuCfsQuotaPeriod, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigImageGcHighThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigImageGcHighThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcHighThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigImageGcHighThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigImageGcLowThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigImageGcLowThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcLowThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigImageGcLowThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigTopologyManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigTopologyManagerPolicy = (string) content.GetValueForProperty("KubeletConfigTopologyManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigTopologyManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigAllowedUnsafeSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigAllowedUnsafeSysctl = (string[]) content.GetValueForProperty("KubeletConfigAllowedUnsafeSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigAllowedUnsafeSysctl, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("KubeletConfigFailSwapOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigFailSwapOn = (bool?) content.GetValueForProperty("KubeletConfigFailSwapOn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigFailSwapOn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigContainerLogMaxSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigContainerLogMaxSizeMb = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigContainerLogMaxSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigContainerLogMaxFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigContainerLogMaxFile = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxFile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigContainerLogMaxFile, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigPodMaxPid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigPodMaxPid = (int?) content.GetValueForProperty("KubeletConfigPodMaxPid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigPodMaxPid, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigTransparentHugePageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigTransparentHugePageEnabled = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigTransparentHugePageEnabled, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigTransparentHugePageDefrag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigTransparentHugePageDefrag = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageDefrag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigTransparentHugePageDefrag, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigSwapFileSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigSwapFileSizeMb = (int?) content.GetValueForProperty("LinuxOSConfigSwapFileSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigSwapFileSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigSysctl = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) content.GetValueForProperty("LinuxOSConfigSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigSysctl, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationDataSourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CreationDataSourceResourceId, 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 AgentPool(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.Api20230201.IAgentPoolInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).AzureAsyncOperation, global::System.Convert.ToString); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerStateTypeConverter.ConvertFrom); + } + if (content.Contains("KubeletConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig) content.GetValueForProperty("KubeletConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationDataTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadRuntime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).WorkloadRuntime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime?) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).WorkloadRuntime, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime.CreateFrom); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + } + if (content.Contains("UpgradeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxOSConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig) content.GetValueForProperty("LinuxOSConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfigTypeConverter.ConvertFrom); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).VMSize = (string) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).VMSize, global::System.Convert.ToString); + } + if (content.Contains("OSDiskSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); + } + if (content.Contains("KubeletDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType?) content.GetValueForProperty("KubeletDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType.CreateFrom); + } + if (content.Contains("VnetSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).VnetSubnetId, global::System.Convert.ToString); + } + if (content.Contains("PodSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PodSubnetId, global::System.Convert.ToString); + } + if (content.Contains("MaxPod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku?) content.GetValueForProperty("OSSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OSSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku.CreateFrom); + } + if (content.Contains("MaxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnableAutoScaling")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScaleDownMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleDownMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode?) content.GetValueForProperty("ScaleDownMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleDownMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode.CreateFrom); + } + if (content.Contains("PropertiesType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PropertiesType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("PropertiesType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PropertiesType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); + } + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); + } + if (content.Contains("OrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).OrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("CurrentOrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CurrentOrchestratorVersion = (string) content.GetValueForProperty("CurrentOrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CurrentOrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("NodeImageVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeImageVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("EnableNodePublicIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NodePublicIPPrefixId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodePublicIPPrefixId = (string) content.GetValueForProperty("NodePublicIPPrefixId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodePublicIPPrefixId, global::System.Convert.ToString); + } + if (content.Contains("ScaleSetPriority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); + } + if (content.Contains("ScaleSetEvictionPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); + } + if (content.Contains("SpotMaxPrice")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeTaint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ProximityPlacementGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).ProximityPlacementGroupId, global::System.Convert.ToString); + } + if (content.Contains("EnableEncryptionAtHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableEncryptionAtHost = (bool?) content.GetValueForProperty("EnableEncryptionAtHost",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableEncryptionAtHost, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableUltraSsd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableUltraSsd = (bool?) content.GetValueForProperty("EnableUltraSsd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableUltraSsd, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableFips")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableFips = (bool?) content.GetValueForProperty("EnableFips",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).EnableFips, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GpuInstanceProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).GpuInstanceProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile?) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).GpuInstanceProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile.CreateFrom); + } + if (content.Contains("HostGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).HostGroupId, global::System.Convert.ToString); + } + if (content.Contains("PowerStateCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + } + if (content.Contains("UpgradeSettingMaxSurge")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuCfsQuota")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuCfsQuota = (bool?) content.GetValueForProperty("KubeletConfigCpuCfsQuota",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuCfsQuota, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigCpuCfsQuotaPeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuCfsQuotaPeriod = (string) content.GetValueForProperty("KubeletConfigCpuCfsQuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigCpuCfsQuotaPeriod, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigImageGcHighThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigImageGcHighThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcHighThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigImageGcHighThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigImageGcLowThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigImageGcLowThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcLowThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigImageGcLowThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigTopologyManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigTopologyManagerPolicy = (string) content.GetValueForProperty("KubeletConfigTopologyManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigTopologyManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigAllowedUnsafeSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigAllowedUnsafeSysctl = (string[]) content.GetValueForProperty("KubeletConfigAllowedUnsafeSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigAllowedUnsafeSysctl, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("KubeletConfigFailSwapOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigFailSwapOn = (bool?) content.GetValueForProperty("KubeletConfigFailSwapOn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigFailSwapOn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigContainerLogMaxSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigContainerLogMaxSizeMb = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigContainerLogMaxSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigContainerLogMaxFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigContainerLogMaxFile = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxFile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigContainerLogMaxFile, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigPodMaxPid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigPodMaxPid = (int?) content.GetValueForProperty("KubeletConfigPodMaxPid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).KubeletConfigPodMaxPid, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigTransparentHugePageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigTransparentHugePageEnabled = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigTransparentHugePageEnabled, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigTransparentHugePageDefrag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigTransparentHugePageDefrag = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageDefrag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigTransparentHugePageDefrag, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigSwapFileSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigSwapFileSizeMb = (int?) content.GetValueForProperty("LinuxOSConfigSwapFileSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigSwapFileSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigSysctl = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) content.GetValueForProperty("LinuxOSConfigSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).LinuxOSConfigSysctl, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationDataSourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).CreationDataSourceResourceId, 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.Api20230201.IAgentPool DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AgentPool(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.Api20230201.IAgentPool DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AgentPool(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.Api20230201.IAgentPool 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(); + } + /// Agent Pool. + [System.ComponentModel.TypeConverter(typeof(AgentPoolTypeConverter))] + public partial interface IAgentPool + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.TypeConverter.cs index fa5ba16b7822..3f6c4dcc3882 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.cs new file mode 100644 index 000000000000..c95dce8da9f2 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.cs @@ -0,0 +1,1177 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Agent Pool. + public partial class AgentPool : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SubResource(); + + /// + /// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string[] AvailabilityZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).AvailabilityZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).AvailabilityZone = value ?? null /* arrayOf */; } + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? Count { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Count = value ?? default(int); } + + /// This is the ARM ID of the source object to be used to create the target object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string CreationDataSourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CreationDataSourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string CurrentOrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CurrentOrchestratorVersion; } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableAutoScaling; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? EnableEncryptionAtHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableEncryptionAtHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableFips; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// The default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? EnableNodePublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableNodePublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableNodePublicIP = value ?? default(bool); } + + /// Whether to enable UltraSSD + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? EnableUltraSsd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableUltraSsd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).EnableUltraSsd = value ?? default(bool); } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile? GpuInstanceProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GpuInstanceProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).GpuInstanceProfile = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile)""); } + + /// + /// 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)] + public string HostGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).HostGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).HostGroupId = value ?? null; } + + /// 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.Api20230201.ISubResourceInternal)__subResource).Id; } + + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string[] KubeletConfigAllowedUnsafeSysctl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigAllowedUnsafeSysctl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigAllowedUnsafeSysctl = value ?? null /* arrayOf */; } + + /// + /// The maximum number of container log files that can be present for a container. The number must be ≥ 2. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? KubeletConfigContainerLogMaxFile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigContainerLogMaxFile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigContainerLogMaxFile = value ?? default(int); } + + /// The maximum size (e.g. 10Mi) of container log file before it is rotated. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? KubeletConfigContainerLogMaxSizeMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigContainerLogMaxSizeMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigContainerLogMaxSizeMb = value ?? default(int); } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigCpuCfsQuota; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeletConfigCpuCfsQuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigCpuCfsQuotaPeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// for more information. Allowed values are 'none' and 'static'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeletConfigCpuManagerPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigCpuManagerPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigCpuManagerPolicy = value ?? null; } + + /// + /// If set to true it will make the Kubelet fail to start if swap is enabled on the node. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? KubeletConfigFailSwapOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigFailSwapOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigFailSwapOn = value ?? default(bool); } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigImageGcHighThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigImageGcHighThreshold = value ?? default(int); } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigImageGcLowThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigImageGcLowThreshold = value ?? default(int); } + + /// The maximum number of processes per pod. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? KubeletConfigPodMaxPid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigPodMaxPid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigPodMaxPid = value ?? default(int); } + + /// + /// 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)] + public string KubeletConfigTopologyManagerPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigTopologyManagerPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfigTopologyManagerPolicy = value ?? null; } + + /// + /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType? KubeletDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletDiskType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType)""); } + + /// The size in MB of a swap file that will be created on each node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? LinuxOSConfigSwapFileSizeMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigSwapFileSizeMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigSwapFileSizeMb = value ?? default(int); } + + /// Sysctl settings for Linux agent nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig LinuxOSConfigSysctl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigSysctl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string LinuxOSConfigTransparentHugePageDefrag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigTransparentHugePageDefrag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string LinuxOSConfigTransparentHugePageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigTransparentHugePageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfigTransparentHugePageEnabled = value ?? null; } + + /// The maximum number of nodes for auto-scaling + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? MaxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MaxCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MaxCount = value ?? default(int); } + + /// The maximum number of pods that can run on a node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? MaxPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MaxPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MaxPod = value ?? default(int); } + + /// Internal Acessors for CreationData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal.CreationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CreationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CreationData = value; } + + /// Internal Acessors for CurrentOrchestratorVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal.CurrentOrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CurrentOrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).CurrentOrchestratorVersion = value; } + + /// Internal Acessors for KubeletConfig + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal.KubeletConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).KubeletConfig = value; } + + /// Internal Acessors for LinuxOSConfig + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal.LinuxOSConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).LinuxOSConfig = value; } + + /// Internal Acessors for NodeImageVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion = value; } + + /// Internal Acessors for PowerState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerState = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for UpgradeSetting + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal.UpgradeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSetting = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Type = value; } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).MinCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Mode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Mode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode)""); } + + /// + /// 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.Api20230201.ISubResourceInternal)__subResource).Name; } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeImageVersion; } + + /// The node labels to be persisted across all nodes in agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeLabel = value ?? null /* model class */; } + + /// + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodePublicIPPrefixId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodePublicIPPrefixId = value ?? null; } + + /// + /// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string[] NodeTaint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeTaint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).NodeTaint = value ?? null /* arrayOf */; } + + /// + /// OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it + /// will apply the default osDisk size according to the vmSize specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSDiskType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSSku = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku)""); } + + /// The operating system type. The default is Linux. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType)""); } + + /// + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).OrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PodSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PodSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PodSubnetId = value ?? null; } + + /// Tells whether the cluster is Running or Stopped + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerStateCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).PowerStateCode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } + + /// The type of Agent Pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? PropertiesType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties _property; + + /// Properties of an agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileProperties()); set => this._property = value; } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProvisioningState; } + + /// The ID for Proximity Placement Group. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ProximityPlacementGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProximityPlacementGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ProximityPlacementGroupId = value ?? null; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode? ScaleDownMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleDownMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleDownMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode)""); } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetEvictionPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetEvictionPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy)""); } + + /// + /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? ScaleSetPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).ScaleSetPriority = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority)""); } + + /// + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SpotMaxPrice; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).SpotMaxPrice = value ?? default(float); } + + /// 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.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).Tag = value ?? null /* model class */; } + + /// 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.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string UpgradeSettingMaxSurge { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).UpgradeSettingMaxSurge; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string VMSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VMSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VMSize = value ?? null; } + + /// + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VnetSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).VnetSubnetId = value ?? null; } + + /// Determines the type of workload a node can run. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime? WorkloadRuntime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).WorkloadRuntime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)Property).WorkloadRuntime = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime)""); } + + /// Creates an new instance. + public AgentPool() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader0) is string __headerAzureAsyncOperationHeader0 ? __headerAzureAsyncOperationHeader0 : (string)null; + } + } + + /// 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); + } + } + /// Agent Pool. + public partial interface IAgentPool : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource + { + /// + /// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.", + SerializedName = @"availabilityZones", + PossibleTypes = new [] { typeof(string) })] + string[] AvailabilityZone { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? Count { get; set; } + /// This is the ARM ID of the source object to be used to create the target object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the ARM ID of the source object to be used to create the target object.", + SerializedName = @"sourceResourceId", + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + 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.", + SerializedName = @"currentOrchestratorVersion", + PossibleTypes = new [] { typeof(string) })] + string CurrentOrchestratorVersion { get; } + /// Whether to enable auto-scaler + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable auto-scaler", + SerializedName = @"enableAutoScaling", + 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + 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) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + 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). + /// The default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"enableNodePublicIP", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableNodePublicIP { get; set; } + /// Whether to enable UltraSSD + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable UltraSSD", + SerializedName = @"enableUltraSSD", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableUltraSsd { get; set; } + /// + /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.", + SerializedName = @"gpuInstanceProfile", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile? GpuInstanceProfile { get; set; } + /// + /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"hostGroupID", + PossibleTypes = new [] { typeof(string) })] + string HostGroupId { get; set; } + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).", + SerializedName = @"allowedUnsafeSysctls", + PossibleTypes = new [] { typeof(string) })] + string[] KubeletConfigAllowedUnsafeSysctl { get; set; } + /// + /// The maximum number of container log files that can be present for a container. The number must be ≥ 2. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of container log files that can be present for a container. The number must be ≥ 2.", + SerializedName = @"containerLogMaxFiles", + PossibleTypes = new [] { typeof(int) })] + int? KubeletConfigContainerLogMaxFile { get; set; } + /// The maximum size (e.g. 10Mi) of container log file before it is rotated. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum size (e.g. 10Mi) of container log file before it is rotated.", + SerializedName = @"containerLogMaxSizeMB", + PossibleTypes = new [] { typeof(int) })] + int? KubeletConfigContainerLogMaxSizeMb { get; set; } + /// The default is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + 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) + /// for more information. Allowed values are 'none' and 'static'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + SerializedName = @"cpuManagerPolicy", + PossibleTypes = new [] { typeof(string) })] + string KubeletConfigCpuManagerPolicy { get; set; } + /// + /// If set to true it will make the Kubelet fail to start if swap is enabled on the node. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If set to true it will make the Kubelet fail to start if swap is enabled on the node.", + SerializedName = @"failSwapOn", + PossibleTypes = new [] { typeof(bool) })] + bool? KubeletConfigFailSwapOn { get; set; } + /// To disable image garbage collection, set to 100. The default is 85% + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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% + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This cannot be set higher than imageGcHighThreshold. The default is 80%", + SerializedName = @"imageGcLowThreshold", + PossibleTypes = new [] { typeof(int) })] + int? KubeletConfigImageGcLowThreshold { get; set; } + /// The maximum number of processes per pod. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of processes per pod.", + SerializedName = @"podMaxPids", + 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 default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + SerializedName = @"topologyManagerPolicy", + PossibleTypes = new [] { typeof(string) })] + string KubeletConfigTopologyManagerPolicy { get; set; } + /// + /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.", + SerializedName = @"kubeletDiskType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType? KubeletDiskType { get; set; } + /// The size in MB of a swap file that will be created on each node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size in MB of a swap file that will be created on each node.", + SerializedName = @"swapFileSizeMB", + PossibleTypes = new [] { typeof(int) })] + int? LinuxOSConfigSwapFileSizeMb { get; set; } + /// Sysctl settings for Linux agent nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl settings for Linux agent nodes.", + SerializedName = @"sysctls", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"transparentHugePageEnabled", + PossibleTypes = new [] { typeof(string) })] + string LinuxOSConfigTransparentHugePageEnabled { get; set; } + /// The maximum number of nodes for auto-scaling + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of nodes for auto-scaling", + SerializedName = @"maxCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCount { get; set; } + /// The maximum number of pods that can run on a node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of pods that can run on a node.", + SerializedName = @"maxPods", + PossibleTypes = new [] { typeof(int) })] + int? MaxPod { get; set; } + /// The minimum number of nodes for auto-scaling + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum number of nodes for auto-scaling", + SerializedName = @"minCount", + 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get; set; } + /// The version of node image + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The version of node image", + SerializedName = @"nodeImageVersion", + PossibleTypes = new [] { typeof(string) })] + string NodeImageVersion { get; } + /// The node labels to be persisted across all nodes in agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The node labels to be persisted across all nodes in agent pool.", + SerializedName = @"nodeLabels", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } + /// + /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}", + SerializedName = @"nodePublicIPPrefixID", + PossibleTypes = new [] { typeof(string) })] + string NodePublicIPPrefixId { get; set; } + /// + /// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.", + SerializedName = @"nodeTaints", + PossibleTypes = new [] { typeof(string) })] + string[] NodeTaint { get; set; } + /// + /// OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it + /// will apply the default osDisk size according to the vmSize specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.", + SerializedName = @"osDiskSizeGB", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"osDiskType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get; set; } + /// + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + /// Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get; set; } + /// The operating system type. The default is Linux. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operating system type. The default is Linux.", + SerializedName = @"osType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + 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} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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}", + SerializedName = @"podSubnetID", + PossibleTypes = new [] { typeof(string) })] + string PodSubnetId { get; set; } + /// Tells whether the cluster is Running or Stopped + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tells whether the cluster is Running or Stopped", + SerializedName = @"code", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } + /// The type of Agent Pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of Agent Pool.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? PropertiesType { get; set; } + /// The current deployment or provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current deployment or provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// The ID for Proximity Placement Group. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ID for Proximity Placement Group.", + SerializedName = @"proximityPlacementGroupID", + PossibleTypes = new [] { typeof(string) })] + string ProximityPlacementGroupId { get; set; } + /// + /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.", + SerializedName = @"scaleDownMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode? ScaleDownMode { get; set; } + /// + /// 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, + ReadOnly = false, + Description = @"This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.", + SerializedName = @"scaleSetEvictionPolicy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get; set; } + /// + /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.", + SerializedName = @"scaleSetPriority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? 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) + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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)", + SerializedName = @"spotMaxPrice", + PossibleTypes = new [] { typeof(float) })] + float? SpotMaxPrice { get; set; } + /// The tags to be persisted on the agent pool virtual machine scale set. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The tags to be persisted on the agent pool virtual machine scale set.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + SerializedName = @"vmSize", + PossibleTypes = new [] { typeof(string) })] + string VMSize { 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} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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}", + SerializedName = @"vnetSubnetID", + PossibleTypes = new [] { typeof(string) })] + string VnetSubnetId { get; set; } + /// Determines the type of workload a node can run. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Determines the type of workload a node can run.", + SerializedName = @"workloadRuntime", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime? WorkloadRuntime { get; set; } + + } + /// Agent Pool. + internal partial interface IAgentPoolInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal + { + /// + /// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + /// + string[] AvailabilityZone { get; set; } + + string AzureAsyncOperation { 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. + /// + int? Count { get; set; } + /// + /// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData CreationData { get; set; } + /// 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. + /// + string CurrentOrchestratorVersion { 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 + /// + 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) + /// 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). + /// The default is false. + /// + bool? EnableNodePublicIP { get; set; } + /// Whether to enable UltraSSD + bool? EnableUltraSsd { get; set; } + /// + /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile? GpuInstanceProfile { get; set; } + /// + /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + /// + string HostGroupId { get; set; } + /// The Kubelet configuration on the agent pool nodes. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig KubeletConfig { get; set; } + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + string[] KubeletConfigAllowedUnsafeSysctl { get; set; } + /// + /// The maximum number of container log files that can be present for a container. The number must be ≥ 2. + /// + 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. + 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'. + /// + 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) + /// for more information. Allowed values are 'none' and 'static'. + /// + string KubeletConfigCpuManagerPolicy { get; set; } + /// + /// 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% + int? KubeletConfigImageGcHighThreshold { get; set; } + /// 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 default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + /// + string KubeletConfigTopologyManagerPolicy { get; set; } + /// + /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType? KubeletDiskType { get; set; } + /// The OS configuration of Linux agent nodes. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig LinuxOSConfig { get; set; } + /// The size in MB of a swap file that will be created on each node. + int? LinuxOSConfigSwapFileSizeMb { get; set; } + /// Sysctl settings for Linux agent nodes. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + 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). + /// + 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; } + /// 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 + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } + /// + /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// + string NodePublicIPPrefixId { get; set; } + /// + /// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + /// + string[] NodeTaint { get; set; } + /// + /// OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it + /// will apply the default osDisk size according to the vmSize specified. + /// + 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). + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get; set; } + /// + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + /// Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get; set; } + /// The operating system type. The default is Linux. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? 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). + /// + 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} + /// + 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 + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState PowerState { get; set; } + /// Tells whether the cluster is Running or Stopped + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } + /// The type of Agent Pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? PropertiesType { get; set; } + /// Properties of an agent pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties Property { 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode? ScaleDownMode { get; set; } + /// + /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get; set; } + /// + /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? 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) + /// + float? SpotMaxPrice { get; set; } + /// The tags to be persisted on the agent pool virtual machine scale set. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags Tag { get; set; } + /// Settings for upgrading the agentpool + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + 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 + /// + string VMSize { 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} + /// + string VnetSubnetId { get; set; } + /// Determines the type of workload a node can run. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime? WorkloadRuntime { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.json.cs index c0a930968acc..f9389a40d8a2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPool.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPool.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AgentPool(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObjec { return; } - __subResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.SubResource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileProperties.FromJson(__jsonProperties) : Property;} + __subResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SubResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPool(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.PowerShell.cs similarity index 78% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.PowerShell.cs index 18bfb6378813..fe9d58110e50 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AgentPoolAvailableVersions partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,29 +70,29 @@ internal AgentPoolAvailableVersions(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("AgentPoolVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).AgentPoolVersion = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[]) content.GetValueForProperty("AgentPoolVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).AgentPoolVersion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).AgentPoolVersion = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[]) content.GetValueForProperty("AgentPoolVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).AgentPoolVersion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemTypeConverter.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. @@ -107,49 +107,49 @@ internal AgentPoolAvailableVersions(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("AgentPoolVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).AgentPoolVersion = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[]) content.GetValueForProperty("AgentPoolVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal)this).AgentPoolVersion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).AgentPoolVersion = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[]) content.GetValueForProperty("AgentPoolVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal)this).AgentPoolVersion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemTypeConverter.ConvertFrom)); } 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.Api20200901.IAgentPoolAvailableVersions DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersions DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentPoolAvailableVersions(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.Api20200901.IAgentPoolAvailableVersions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersions DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentPoolAvailableVersions(content); } @@ -159,7 +159,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPo /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersions FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.TypeConverter.cs index f56fda310033..4c39011ab90d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersions ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersions ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersions).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersions).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.cs similarity index 71% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.cs index 7cfc1f9b679b..b7543782d397 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.cs @@ -3,57 +3,57 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// The list of available versions for an agent pool. public partial class AgentPoolAvailableVersions : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersions, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersions, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal { /// List of versions available for agent pool. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesInternal)Property).AgentPoolVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesInternal)Property).AgentPoolVersion = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesInternal)Property).AgentPoolVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesInternal)Property).AgentPoolVersion = value ?? null /* arrayOf */; } /// Backing field for property. private string _id; - /// Id of the agent pool available versions. + /// The ID of the agent pool version list. [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.Api20200901.IAgentPoolAvailableVersionsInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsProperties()); set { {_property = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; - /// Name of the agent pool available versions. + /// The name of the agent pool version list. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties _property; /// Properties of agent pool available versions. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsProperties()); set => this._property = value; } /// Backing field for property. private string _type; - /// Type of the agent pool available versions. + /// Type of the agent pool version list. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Type { get => this._type; } @@ -73,29 +73,29 @@ public partial interface IAgentPoolAvailableVersions : ReadOnly = false, Description = @"List of versions available for agent pool.", SerializedName = @"agentPoolVersions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get; set; } - /// Id of the agent pool available versions. + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get; set; } + /// The ID of the agent pool version list. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Id of the agent pool available versions.", + Description = @"The ID of the agent pool version list.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; } - /// Name of the agent pool available versions. + /// The name of the agent pool version list. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Name of the agent pool available versions.", + Description = @"The name of the agent pool version list.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; } - /// Type of the agent pool available versions. + /// Type of the agent pool version list. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Type of the agent pool available versions.", + Description = @"Type of the agent pool version list.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] string Type { get; } @@ -106,14 +106,14 @@ internal partial interface IAgentPoolAvailableVersionsInternal { /// List of versions available for agent pool. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get; set; } - /// Id of the agent pool available versions. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get; set; } + /// The ID of the agent pool version list. string Id { get; set; } - /// Name of the agent pool available versions. + /// The name of the agent pool version list. string Name { get; set; } /// Properties of agent pool available versions. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties Property { get; set; } - /// Type of the agent pool available versions. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties Property { get; set; } + /// Type of the agent pool version list. string Type { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.json.cs index 9bc4e1eae1db..1b9924082b8b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersions.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersions.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -65,7 +65,7 @@ internal AgentPoolAvailableVersions(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runti { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsProperties.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;} @@ -73,13 +73,13 @@ internal AgentPoolAvailableVersions(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runti } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersions. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersions. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersions. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersions. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersions FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersions FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolAvailableVersions(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.PowerShell.cs similarity index 86% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.PowerShell.cs index 3527e8494d5d..ef20e165f49c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AgentPoolAvailableVersionsProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,13 +70,13 @@ internal AgentPoolAvailableVersionsProperties(global::System.Collections.IDictio // actually deserialize if (content.Contains("AgentPoolVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesInternal)this).AgentPoolVersion = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[]) content.GetValueForProperty("AgentPoolVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesInternal)this).AgentPoolVersion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesInternal)this).AgentPoolVersion = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[]) content.GetValueForProperty("AgentPoolVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesInternal)this).AgentPoolVersion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemTypeConverter.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. @@ -91,35 +91,35 @@ internal AgentPoolAvailableVersionsProperties(global::System.Management.Automati // actually deserialize if (content.Contains("AgentPoolVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesInternal)this).AgentPoolVersion = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[]) content.GetValueForProperty("AgentPoolVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesInternal)this).AgentPoolVersion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesInternal)this).AgentPoolVersion = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[]) content.GetValueForProperty("AgentPoolVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesInternal)this).AgentPoolVersion, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemTypeConverter.ConvertFrom)); } 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentPoolAvailableVersionsProperties(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentPoolAvailableVersionsProperties(content); } @@ -131,7 +131,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPo /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.TypeConverter.cs index 27866fb257ea..09d493976a42 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.cs similarity index 81% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.cs index ba0593cb7064..d4f4e210300c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// The list of available agent pool versions. public partial class AgentPoolAvailableVersionsProperties : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] _agentPoolVersion; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] _agentPoolVersion; /// List of versions available for agent pool. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get => this._agentPoolVersion; set => this._agentPoolVersion = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get => this._agentPoolVersion; set => this._agentPoolVersion = value; } /// Creates an new instance. public AgentPoolAvailableVersionsProperties() @@ -36,8 +36,8 @@ public partial interface IAgentPoolAvailableVersionsProperties : ReadOnly = false, Description = @"List of versions available for agent pool.", SerializedName = @"agentPoolVersions", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get; set; } } /// The list of available agent pool versions. @@ -45,7 +45,7 @@ internal partial interface IAgentPoolAvailableVersionsPropertiesInternal { /// List of versions available for agent pool. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem[] AgentPoolVersion { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.json.cs index 7228921a6218..40d94e8e64a7 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsProperties.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -65,18 +65,18 @@ internal AgentPoolAvailableVersionsProperties(Microsoft.Azure.PowerShell.Cmdlets { return; } - {_agentPoolVersion = If( json?.PropertyT("agentPoolVersions"), out var __jsonAgentPoolVersions) ? If( __jsonAgentPoolVersions as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.FromJson(__u) )) ))() : null : AgentPoolVersion;} + {_agentPoolVersion = If( json?.PropertyT("agentPoolVersions"), out var __jsonAgentPoolVersions) ? If( __jsonAgentPoolVersions as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.FromJson(__u) )) ))() : null : AgentPoolVersion;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolAvailableVersionsProperties(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.PowerShell.cs similarity index 87% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.PowerShell.cs index 00727e4fa9ad..feab4cea69c7 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -54,7 +54,7 @@ public partial class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -69,21 +69,21 @@ internal AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(global::Syste // actually deserialize if (content.Contains("Default")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).Default = (bool?) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).Default, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).Default = (bool?) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).Default, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("IsPreview")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } 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. @@ -98,43 +98,43 @@ internal AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(global::Syste // actually deserialize if (content.Contains("Default")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).Default = (bool?) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).Default, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).Default = (bool?) content.GetValueForProperty("Default",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).Default, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("IsPreview")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(content); } @@ -147,7 +147,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPo /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.TypeConverter.cs index 14612b010656..7c9f2d8e545f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no /// suitable conversion. ///
- public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs similarity index 88% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs index fefc6caf56ea..ec6f793298d1 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; public partial class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItemInternal { /// Backing field for property. @@ -29,7 +29,7 @@ public partial class AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem : /// Backing field for property. private string _kubernetesVersion; - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string KubernetesVersion { get => this._kubernetesVersion; set => this._kubernetesVersion = value; } @@ -60,11 +60,11 @@ public partial interface IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsI SerializedName = @"isPreview", PossibleTypes = new [] { typeof(bool) })] bool? IsPreview { get; set; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Kubernetes version (major, minor, patch).", + Description = @"The Kubernetes version (major.minor.patch).", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] string KubernetesVersion { get; set; } @@ -77,7 +77,7 @@ internal partial interface IAgentPoolAvailableVersionsPropertiesAgentPoolVersion bool? Default { get; set; } /// Whether Kubernetes version is currently in preview. bool? IsPreview { get; set; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). string KubernetesVersion { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.json.cs index 4f9cc8fc8ac9..379124583208 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -72,13 +72,13 @@ internal AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(Microsoft.Azu } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolAvailableVersionsPropertiesAgentPoolVersionsItem(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.PowerShell.cs similarity index 84% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.PowerShell.cs index 77f6d5865c46..2caa13ecb6cc 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AgentPoolListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,17 +70,17 @@ internal AgentPoolListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResultInternal)this).NextLink, 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. @@ -95,37 +95,37 @@ internal AgentPoolListResult(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResultInternal)this).NextLink, 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.Api20200901.IAgentPoolListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentPoolListResult(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.Api20200901.IAgentPoolListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentPoolListResult(content); } @@ -135,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPo /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.TypeConverter.cs index 60fb39355521..ea49cbcc8318 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.cs similarity index 84% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.cs index a487688afe14..d73fab6be1ae 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// The response from the List Agent Pools operation. public partial class AgentPoolListResult : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResult, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Backing field for property. private string _nextLink; @@ -24,11 +24,11 @@ public partial class AgentPoolListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool[] _value; /// The list of agent pools. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public AgentPoolListResult() @@ -54,8 +54,8 @@ public partial interface IAgentPoolListResult : ReadOnly = false, Description = @"The list of agent pools.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool[] Value { get; set; } } /// The response from the List Agent Pools operation. @@ -65,7 +65,7 @@ internal partial interface IAgentPoolListResultInternal /// The URL to get the next set of agent pool results. string NextLink { get; set; } /// The list of agent pools. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool[] Value { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.json.cs index 8addd0447d11..b41f7d2b0578 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolListResult.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -65,19 +65,19 @@ internal AgentPoolListResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json { 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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPool) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPool.FromJson(__u) )) ))() : null : Value;} + {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPool) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPool.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolListResult(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.PowerShell.cs similarity index 78% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.PowerShell.cs index d8644b01852b..d8c4074420e4 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AgentPoolUpgradeProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,41 +70,41 @@ internal AgentPoolUpgradeProfile(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfilePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfilePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("OSType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); } if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("Upgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfilePropertiesUpgradesItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfilePropertiesUpgradesItemTypeConverter.ConvertFrom)); } if (content.Contains("LatestNodeImageVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).LatestNodeImageVersion = (string) content.GetValueForProperty("LatestNodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).LatestNodeImageVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).LatestNodeImageVersion = (string) content.GetValueForProperty("LatestNodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).LatestNodeImageVersion, 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. @@ -119,61 +119,61 @@ internal AgentPoolUpgradeProfile(global::System.Management.Automation.PSObject c // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfilePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfilePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("OSType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); } if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("Upgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfilePropertiesUpgradesItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfilePropertiesUpgradesItemTypeConverter.ConvertFrom)); } if (content.Contains("LatestNodeImageVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).LatestNodeImageVersion = (string) content.GetValueForProperty("LatestNodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal)this).LatestNodeImageVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).LatestNodeImageVersion = (string) content.GetValueForProperty("LatestNodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal)this).LatestNodeImageVersion, 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.Api20200901.IAgentPoolUpgradeProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentPoolUpgradeProfile(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.Api20200901.IAgentPoolUpgradeProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentPoolUpgradeProfile(content); } @@ -183,7 +183,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPo /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.TypeConverter.cs index f0040d66db40..4c3fbd9b4a1d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.cs similarity index 65% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.cs index a6eefa7ada08..c36b8d4a3f2e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.cs @@ -3,73 +3,71 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// The list of available upgrades for an agent pool. public partial class AgentPoolUpgradeProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal { /// Backing field for property. private string _id; - /// Id of the agent pool upgrade profile. + /// The ID of the agent pool upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Id { get => this._id; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)Property).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)Property).KubernetesVersion = value ; } + public string KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)Property).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)Property).KubernetesVersion = value ; } - /// LatestNodeImageVersion is the latest AKS supported node image version. + /// The latest AKS supported node image version. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string LatestNodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)Property).LatestNodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)Property).LatestNodeImageVersion = value ?? null; } + public string LatestNodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)Property).LatestNodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)Property).LatestNodeImageVersion = value ?? null; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfileProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfileProperties()); set { {_property = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; - /// Name of the agent pool upgrade profile. + /// The name of the agent pool upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Name { get => this._name; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)Property).OSType = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)Property).OSType = value ; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties _property; - /// Properties of agent pool upgrade profile. + /// The properties of the agent pool upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfileProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfileProperties()); set => this._property = value; } /// Backing field for property. private string _type; - /// Type of the agent pool upgrade profile. + /// The type of the agent pool upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Type { get => this._type; } /// List of orchestrator types and versions available for upgrade. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)Property).Upgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)Property).Upgrade = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)Property).Upgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)Property).Upgrade = value ?? null /* arrayOf */; } /// Creates an new instance. public AgentPoolUpgradeProfile() @@ -81,53 +79,51 @@ public AgentPoolUpgradeProfile() public partial interface IAgentPoolUpgradeProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// Id of the agent pool upgrade profile. + /// The ID of the agent pool upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Id of the agent pool upgrade profile.", + Description = @"The ID of the agent pool upgrade profile.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Kubernetes version (major, minor, patch).", + Description = @"The Kubernetes version (major.minor.patch).", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] string KubernetesVersion { get; set; } - /// LatestNodeImageVersion is the latest AKS supported node image version. + /// The latest AKS supported node image version. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"LatestNodeImageVersion is the latest AKS supported node image version.", + Description = @"The latest AKS supported node image version.", SerializedName = @"latestNodeImageVersion", PossibleTypes = new [] { typeof(string) })] string LatestNodeImageVersion { get; set; } - /// Name of the agent pool upgrade profile. + /// The name of the agent pool upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Name of the agent pool upgrade profile.", + Description = @"The name of the agent pool upgrade profile.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.", + Description = @"The operating system type. The default is Linux.", SerializedName = @"osType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType OSType { get; set; } - /// Type of the agent pool upgrade profile. + /// The type of the agent pool upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Type of the agent pool upgrade profile.", + Description = @"The type of the agent pool upgrade profile.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] string Type { get; } @@ -137,32 +133,30 @@ public partial interface IAgentPoolUpgradeProfile : ReadOnly = false, Description = @"List of orchestrator types and versions available for upgrade.", SerializedName = @"upgrades", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get; set; } } /// The list of available upgrades for an agent pool. internal partial interface IAgentPoolUpgradeProfileInternal { - /// Id of the agent pool upgrade profile. + /// The ID of the agent pool upgrade profile. string Id { get; set; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). string KubernetesVersion { get; set; } - /// LatestNodeImageVersion is the latest AKS supported node image version. + /// The latest AKS supported node image version. string LatestNodeImageVersion { get; set; } - /// Name of the agent pool upgrade profile. + /// The name of the agent pool upgrade profile. string Name { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType OSType { get; set; } - /// Properties of agent pool upgrade profile. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties Property { get; set; } - /// Type of the agent pool upgrade profile. + /// The properties of the agent pool upgrade profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties Property { get; set; } + /// The type of the agent pool upgrade profile. string Type { get; set; } /// List of orchestrator types and versions available for upgrade. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.json.cs index 930db0245913..82041794fbc4 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -65,7 +65,7 @@ internal AgentPoolUpgradeProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime. { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfileProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfileProperties.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;} @@ -73,13 +73,13 @@ internal AgentPoolUpgradeProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime. } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolUpgradeProfile(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.PowerShell.cs similarity index 83% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.PowerShell.cs index f3576d2aefb4..42e6beeeca86 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AgentPoolUpgradeProfileProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,25 +70,25 @@ internal AgentPoolUpgradeProfileProperties(global::System.Collections.IDictionar // actually deserialize if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("OSType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); } if (content.Contains("Upgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfilePropertiesUpgradesItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfilePropertiesUpgradesItemTypeConverter.ConvertFrom)); } if (content.Contains("LatestNodeImageVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).LatestNodeImageVersion = (string) content.GetValueForProperty("LatestNodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).LatestNodeImageVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).LatestNodeImageVersion = (string) content.GetValueForProperty("LatestNodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).LatestNodeImageVersion, 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. @@ -103,47 +103,47 @@ internal AgentPoolUpgradeProfileProperties(global::System.Management.Automation. // actually deserialize if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("OSType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); } if (content.Contains("Upgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfilePropertiesUpgradesItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfilePropertiesUpgradesItemTypeConverter.ConvertFrom)); } if (content.Contains("LatestNodeImageVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).LatestNodeImageVersion = (string) content.GetValueForProperty("LatestNodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal)this).LatestNodeImageVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).LatestNodeImageVersion = (string) content.GetValueForProperty("LatestNodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal)this).LatestNodeImageVersion, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentPoolUpgradeProfileProperties(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentPoolUpgradeProfileProperties(content); } @@ -155,7 +155,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPo /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.TypeConverter.cs index 0fd3ca89345d..6acfb829c7a2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.cs similarity index 71% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.cs index 0d7a2477fb61..e7ecac360d65 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.cs @@ -3,45 +3,43 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// The list of available upgrade versions. public partial class AgentPoolUpgradeProfileProperties : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesInternal { /// Backing field for property. private string _kubernetesVersion; - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string KubernetesVersion { get => this._kubernetesVersion; set => this._kubernetesVersion = value; } /// Backing field for property. private string _latestNodeImageVersion; - /// LatestNodeImageVersion is the latest AKS supported node image version. + /// The latest AKS supported node image version. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string LatestNodeImageVersion { get => this._latestNodeImageVersion; set => this._latestNodeImageVersion = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType _oSType; - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType OSType { get => this._oSType; set => this._oSType = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] _upgrade; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] _upgrade; /// List of orchestrator types and versions available for upgrade. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get => this._upgrade; set => this._upgrade = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get => this._upgrade; set => this._upgrade = value; } /// Creates an new instance. public AgentPoolUpgradeProfileProperties() @@ -53,29 +51,27 @@ public AgentPoolUpgradeProfileProperties() public partial interface IAgentPoolUpgradeProfileProperties : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Kubernetes version (major, minor, patch).", + Description = @"The Kubernetes version (major.minor.patch).", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] string KubernetesVersion { get; set; } - /// LatestNodeImageVersion is the latest AKS supported node image version. + /// The latest AKS supported node image version. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"LatestNodeImageVersion is the latest AKS supported node image version.", + Description = @"The latest AKS supported node image version.", SerializedName = @"latestNodeImageVersion", PossibleTypes = new [] { typeof(string) })] string LatestNodeImageVersion { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.", + Description = @"The operating system type. The default is Linux.", SerializedName = @"osType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType OSType { get; set; } @@ -85,24 +81,22 @@ public partial interface IAgentPoolUpgradeProfileProperties : ReadOnly = false, Description = @"List of orchestrator types and versions available for upgrade.", SerializedName = @"upgrades", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get; set; } } /// The list of available upgrade versions. internal partial interface IAgentPoolUpgradeProfilePropertiesInternal { - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). string KubernetesVersion { get; set; } - /// LatestNodeImageVersion is the latest AKS supported node image version. + /// The latest AKS supported node image version. string LatestNodeImageVersion { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType OSType { get; set; } /// List of orchestrator types and versions available for upgrade. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem[] Upgrade { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.json.cs index ccadbd051202..6ee57fca9bd2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfileProperties.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfileProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -67,19 +67,19 @@ internal AgentPoolUpgradeProfileProperties(Microsoft.Azure.PowerShell.Cmdlets.Ak } {_kubernetesVersion = If( json?.PropertyT("kubernetesVersion"), out var __jsonKubernetesVersion) ? (string)__jsonKubernetesVersion : (string)KubernetesVersion;} {_oSType = If( json?.PropertyT("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType;} - {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeProfilePropertiesUpgradesItem.FromJson(__u) )) ))() : null : Upgrade;} + {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeProfilePropertiesUpgradesItem.FromJson(__u) )) ))() : null : Upgrade;} {_latestNodeImageVersion = If( json?.PropertyT("latestNodeImageVersion"), out var __jsonLatestNodeImageVersion) ? (string)__jsonLatestNodeImageVersion : (string)LatestNodeImageVersion;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfileProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfileProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolUpgradeProfileProperties(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.PowerShell.cs similarity index 88% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.PowerShell.cs index fb4c2e13999f..4f708b5b3433 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -54,7 +54,7 @@ public partial class AgentPoolUpgradeProfilePropertiesUpgradesItem partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -69,17 +69,17 @@ internal AgentPoolUpgradeProfilePropertiesUpgradesItem(global::System.Collection // actually deserialize if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("IsPreview")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } 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. @@ -94,39 +94,39 @@ internal AgentPoolUpgradeProfilePropertiesUpgradesItem(global::System.Management // actually deserialize if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("IsPreview")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentPoolUpgradeProfilePropertiesUpgradesItem(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentPoolUpgradeProfilePropertiesUpgradesItem(content); } @@ -139,7 +139,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPo /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.TypeConverter.cs index b8ab1ed864e1..2c13a97d6188 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs similarity index 73% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs index 43913f75436f..7bbb251df263 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.cs @@ -3,26 +3,26 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; public partial class AgentPoolUpgradeProfilePropertiesUpgradesItem : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal { /// Backing field for property. private bool? _isPreview; - /// Whether Kubernetes version is currently in preview. + /// Whether the Kubernetes version is currently in preview. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public bool? IsPreview { get => this._isPreview; set => this._isPreview = value; } /// Backing field for property. private string _kubernetesVersion; - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string KubernetesVersion { get => this._kubernetesVersion; set => this._kubernetesVersion = value; } @@ -37,19 +37,19 @@ public AgentPoolUpgradeProfilePropertiesUpgradesItem() public partial interface IAgentPoolUpgradeProfilePropertiesUpgradesItem : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// Whether Kubernetes version is currently in preview. + /// Whether the Kubernetes version is currently in preview. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Whether Kubernetes version is currently in preview.", + Description = @"Whether the Kubernetes version is currently in preview.", SerializedName = @"isPreview", PossibleTypes = new [] { typeof(bool) })] bool? IsPreview { get; set; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Kubernetes version (major, minor, patch).", + Description = @"The Kubernetes version (major.minor.patch).", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] string KubernetesVersion { get; set; } @@ -58,9 +58,9 @@ public partial interface IAgentPoolUpgradeProfilePropertiesUpgradesItem : internal partial interface IAgentPoolUpgradeProfilePropertiesUpgradesItemInternal { - /// Whether Kubernetes version is currently in preview. + /// Whether the Kubernetes version is currently in preview. bool? IsPreview { get; set; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). string KubernetesVersion { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.json.cs index 5b8d18872ec6..6e77753a620b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeProfilePropertiesUpgradesItem.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeProfilePropertiesUpgradesItem.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -71,13 +71,13 @@ internal AgentPoolUpgradeProfilePropertiesUpgradesItem(Microsoft.Azure.PowerShel } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfilePropertiesUpgradesItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfilePropertiesUpgradesItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolUpgradeProfilePropertiesUpgradesItem(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.PowerShell.cs similarity index 89% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.PowerShell.cs index 2467441a8c44..4010e0b295f0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class AgentPoolUpgradeSettings partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,13 +70,13 @@ internal AgentPoolUpgradeSettings(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("MaxSurge")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettingsInternal)this).MaxSurge = (string) content.GetValueForProperty("MaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettingsInternal)this).MaxSurge, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettingsInternal)this).MaxSurge = (string) content.GetValueForProperty("MaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettingsInternal)this).MaxSurge, 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. @@ -91,33 +91,33 @@ internal AgentPoolUpgradeSettings(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("MaxSurge")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettingsInternal)this).MaxSurge = (string) content.GetValueForProperty("MaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettingsInternal)this).MaxSurge, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettingsInternal)this).MaxSurge = (string) content.GetValueForProperty("MaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettingsInternal)this).MaxSurge, 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.Api20200901.IAgentPoolUpgradeSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new AgentPoolUpgradeSettings(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.Api20200901.IAgentPoolUpgradeSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new AgentPoolUpgradeSettings(content); } @@ -127,7 +127,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPo /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.TypeConverter.cs index 1584af1a03dc..b5a5bbc620f9 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.cs new file mode 100644 index 000000000000..92b1f9efd433 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Settings for upgrading an agentpool + public partial class AgentPoolUpgradeSettings : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettingsInternal + { + + /// 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string MaxSurge { get => this._maxSurge; set => this._maxSurge = value; } + + /// Creates an new instance. + public AgentPoolUpgradeSettings() + { + + } + } + /// Settings for upgrading an agentpool + 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + SerializedName = @"maxSurge", + PossibleTypes = new [] { typeof(string) })] + string MaxSurge { get; set; } + + } + /// Settings for upgrading an agentpool + 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 + /// + string MaxSurge { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.json.cs index 2bc016ec906b..e7a1354a1900 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/AgentPoolUpgradeSettings.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AgentPoolUpgradeSettings.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -70,13 +70,13 @@ internal AgentPoolUpgradeSettings(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AgentPoolUpgradeSettings(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.PowerShell.cs similarity index 59% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.PowerShell.cs index 2f484a374e79..868ef8830be2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.PowerShell.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// The Resource model definition. - [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] - public partial class Resource + /// Azure Key Vault key management service settings for the security profile. + [System.ComponentModel.TypeConverter(typeof(AzureKeyVaultKmsTypeConverter))] + public partial class AzureKeyVaultKms { /// @@ -55,44 +55,11 @@ public partial class Resource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new Resource(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.Api20200901.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new Resource(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.Api20200901.IResource 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 Resource(global::System.Collections.IDictionary content) + internal AzureKeyVaultKms(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -101,35 +68,31 @@ internal Resource(global::System.Collections.IDictionary content) return; } // actually deserialize - if (content.Contains("Id")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id, global::System.Convert.ToString); - } - if (content.Contains("Name")) + if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("Type")) + if (content.Contains("KeyId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyId = (string) content.GetValueForProperty("KeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyId, global::System.Convert.ToString); } - if (content.Contains("Location")) + if (content.Contains("KeyVaultNetworkAccess")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyVaultNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes?) content.GetValueForProperty("KeyVaultNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyVaultNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes.CreateFrom); } - if (content.Contains("Tag")) + if (content.Contains("KeyVaultResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyVaultResourceId = (string) content.GetValueForProperty("KeyVaultResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyVaultResourceId, 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 Resource(global::System.Management.Automation.PSObject content) + internal AzureKeyVaultKms(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -138,37 +101,66 @@ internal Resource(global::System.Management.Automation.PSObject content) return; } // actually deserialize - if (content.Contains("Id")) + if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("Name")) + if (content.Contains("KeyId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyId = (string) content.GetValueForProperty("KeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyId, global::System.Convert.ToString); } - if (content.Contains("Type")) + if (content.Contains("KeyVaultNetworkAccess")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyVaultNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes?) content.GetValueForProperty("KeyVaultNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyVaultNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes.CreateFrom); } - if (content.Contains("Location")) + if (content.Contains("KeyVaultResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyVaultResourceId = (string) content.GetValueForProperty("KeyVaultResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)this).KeyVaultResourceId, 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.Api20230201.IAzureKeyVaultKms DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new AzureKeyVaultKms(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.Api20230201.IAzureKeyVaultKms DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new AzureKeyVaultKms(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.Api20230201.IAzureKeyVaultKms 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(); } - /// The Resource model definition. - [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] - public partial interface IResource + /// Azure Key Vault key management service settings for the security profile. + [System.ComponentModel.TypeConverter(typeof(AzureKeyVaultKmsTypeConverter))] + public partial interface IAzureKeyVaultKms { diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.TypeConverter.cs new file mode 100644 index 000000000000..e854758bb19d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class AzureKeyVaultKmsTypeConverter : 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.Api20230201.IAzureKeyVaultKms ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return AzureKeyVaultKms.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return AzureKeyVaultKms.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return AzureKeyVaultKms.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.cs new file mode 100644 index 000000000000..5cd135f1dbc0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.cs @@ -0,0 +1,135 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Azure Key Vault key management service settings for the security profile. + public partial class AzureKeyVaultKms : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// Whether to enable Azure Key Vault key management service. 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; } + + /// Backing field for property. + private string _keyId; + + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string KeyId { get => this._keyId; set => this._keyId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? _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`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? KeyVaultNetworkAccess { get => this._keyVaultNetworkAccess; set => this._keyVaultNetworkAccess = value; } + + /// Backing field for property. + private string _keyVaultResourceId; + + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string KeyVaultResourceId { get => this._keyVaultResourceId; set => this._keyVaultResourceId = value; } + + /// Creates an new instance. + public AzureKeyVaultKms() + { + + } + } + /// Azure Key Vault key management service settings for the security profile. + public partial interface IAzureKeyVaultKms : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable Azure Key Vault key management service. The default is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Azure Key Vault key management service. The default is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty.", + SerializedName = @"keyId", + 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`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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`.", + SerializedName = @"keyVaultNetworkAccess", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? KeyVaultNetworkAccess { get; set; } + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty.", + SerializedName = @"keyVaultResourceId", + PossibleTypes = new [] { typeof(string) })] + string KeyVaultResourceId { get; set; } + + } + /// Azure Key Vault key management service settings for the security profile. + internal partial interface IAzureKeyVaultKmsInternal + + { + /// Whether to enable Azure Key Vault key management service. The default is false. + bool? Enabled { get; set; } + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + 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`. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? KeyVaultNetworkAccess { get; set; } + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + string KeyVaultResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.json.cs new file mode 100644 index 000000000000..39f1e708bf37 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/AzureKeyVaultKms.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Azure Key Vault key management service settings for the security profile. + public partial class AzureKeyVaultKms + { + + /// + /// 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 AzureKeyVaultKms(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;} + {_keyId = If( json?.PropertyT("keyId"), out var __jsonKeyId) ? (string)__jsonKeyId : (string)KeyId;} + {_keyVaultNetworkAccess = If( json?.PropertyT("keyVaultNetworkAccess"), out var __jsonKeyVaultNetworkAccess) ? (string)__jsonKeyVaultNetworkAccess : (string)KeyVaultNetworkAccess;} + {_keyVaultResourceId = If( json?.PropertyT("keyVaultResourceId"), out var __jsonKeyVaultResourceId) ? (string)__jsonKeyVaultResourceId : (string)KeyVaultResourceId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new AzureKeyVaultKms(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._keyId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._keyId.ToString()) : null, "keyId" ,container.Add ); + AddIf( null != (((object)this._keyVaultNetworkAccess)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._keyVaultNetworkAccess.ToString()) : null, "keyVaultNetworkAccess" ,container.Add ); + AddIf( null != (((object)this._keyVaultResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._keyVaultResourceId.ToString()) : null, "keyVaultResourceId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.PowerShell.cs similarity index 78% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.PowerShell.cs index 96abd47ea1e9..6eafb755156f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CloudError partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,29 +70,29 @@ internal CloudError(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CloudErrorBodyTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CloudErrorBodyTypeConverter.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. @@ -107,49 +107,49 @@ internal CloudError(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Error")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBodyTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CloudErrorBodyTypeConverter.ConvertFrom); } if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CloudErrorBodyTypeConverter.ConvertFrom)); } 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.Api20200901.ICloudError DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CloudError(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.Api20200901.ICloudError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CloudError(content); } @@ -159,7 +159,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudEr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.TypeConverter.cs index 1b9943e77738..d4ab45d2a05f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudError ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudError).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.cs similarity index 81% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.cs index e0ca6e6b093f..2c888b87fab8 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.cs @@ -3,47 +3,47 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { 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.Api20200901.ICloudError, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.Api20200901.ICloudErrorBodyInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)Error).Code = value ?? null; } + public string Code { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)Error).Detail = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)Error).Detail = value ?? null /* arrayOf */; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody _error; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.Api20200901.ICloudErrorBody Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBody()); set => this._error = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.Api20200901.ICloudErrorBodyInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)Error).Message = value ?? null; } + public string Message { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)Error).Message = value ?? null; } /// Internal Acessors for Error - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBody()); set { {_error = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.Api20200901.ICloudErrorBodyInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)Error).Target = value ?? null; } + public string Target { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)Error).Target = value ?? null; } /// Creates an new instance. public CloudError() @@ -71,8 +71,8 @@ public partial interface ICloudError : ReadOnly = false, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// @@ -104,9 +104,9 @@ internal partial interface ICloudErrorInternal /// string Code { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[] Detail { get; set; } /// Details about the error. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody Error { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody Error { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.json.cs index 57f0f7739e4b..a647fe924b1a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudError.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudError.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -65,18 +65,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.Api20200901.CloudErrorBody.FromJson(__jsonError) : Error;} + {_error = If( json?.PropertyT("error"), out var __jsonError) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CloudErrorBody.FromJson(__jsonError) : Error;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudError. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudError. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudError FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.PowerShell.cs similarity index 81% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.PowerShell.cs index f4e64f4b9851..4479f44a725e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CloudErrorBody partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,25 +70,25 @@ internal CloudErrorBody(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CloudErrorBodyTypeConverter.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. @@ -103,45 +103,45 @@ internal CloudErrorBody(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Code, global::System.Convert.ToString); } if (content.Contains("Message")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Message, global::System.Convert.ToString); } if (content.Contains("Target")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Target, global::System.Convert.ToString); } if (content.Contains("Detail")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBodyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CloudErrorBodyTypeConverter.ConvertFrom)); } 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.Api20200901.ICloudErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CloudErrorBody(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.Api20200901.ICloudErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CloudErrorBody(content); } @@ -151,7 +151,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudEr /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.TypeConverter.cs index be346f5c5f4a..19d39987221d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.cs similarity index 91% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.cs index 641cb8b1af68..5daffc251cb1 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { 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.Api20200901.ICloudErrorBody, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBodyInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBodyInternal { /// Backing field for property. @@ -23,11 +23,11 @@ public partial class CloudErrorBody : public string Code { get => this._code; set => this._code = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[] _detail; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[] _detail; /// A list of additional details about the error. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[] Detail { get => this._detail; set => this._detail = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[] Detail { get => this._detail; set => this._detail = value; } /// Backing field for property. private string _message; @@ -73,8 +73,8 @@ public partial interface ICloudErrorBody : ReadOnly = false, Description = @"A list of additional details about the error.", SerializedName = @"details", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[] Detail { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// @@ -106,7 +106,7 @@ internal partial interface ICloudErrorBodyInternal /// string Code { get; set; } /// A list of additional details about the error. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody[] Detail { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody[] Detail { get; set; } /// /// A message describing the error, intended to be suitable for display in a user interface. /// diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.json.cs index b1bd66abc7e2..32560c011114 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CloudErrorBody.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CloudErrorBody.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -68,18 +68,18 @@ internal CloudErrorBody(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.Json {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CloudErrorBody.FromJson(__u) )) ))() : null : Detail;} + {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CloudErrorBody.FromJson(__u) )) ))() : null : Detail;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudErrorBody. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICloudErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.PowerShell.cs new file mode 100644 index 000000000000..1610489ab193 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The results of a run command + [System.ComponentModel.TypeConverter(typeof(CommandResultPropertiesTypeConverter))] + public partial class CommandResultProperties + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CommandResultProperties(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.Api20230201.ICommandResultPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).ExitCode = (int?) content.GetValueForProperty("ExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).ExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).StartedAt = (global::System.DateTime?) content.GetValueForProperty("StartedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).StartedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FinishedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).FinishedAt = (global::System.DateTime?) content.GetValueForProperty("FinishedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).FinishedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Log")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).Log = (string) content.GetValueForProperty("Log",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).Log, global::System.Convert.ToString); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).Reason, 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 CommandResultProperties(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.Api20230201.ICommandResultPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).ExitCode = (int?) content.GetValueForProperty("ExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).ExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).StartedAt = (global::System.DateTime?) content.GetValueForProperty("StartedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).StartedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FinishedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).FinishedAt = (global::System.DateTime?) content.GetValueForProperty("FinishedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).FinishedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Log")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).Log = (string) content.GetValueForProperty("Log",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).Log, global::System.Convert.ToString); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)this).Reason, 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.Api20230201.ICommandResultProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CommandResultProperties(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.Api20230201.ICommandResultProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CommandResultProperties(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.Api20230201.ICommandResultProperties 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(); + } + /// The results of a run command + [System.ComponentModel.TypeConverter(typeof(CommandResultPropertiesTypeConverter))] + public partial interface ICommandResultProperties + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.TypeConverter.cs new file mode 100644 index 000000000000..a07a3b192f07 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class CommandResultPropertiesTypeConverter : 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.Api20230201.ICommandResultProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return CommandResultProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return CommandResultProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return CommandResultProperties.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.cs new file mode 100644 index 000000000000..07568a2a6dc8 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The results of a run command + public partial class CommandResultProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal + { + + /// Backing field for property. + private int? _exitCode; + + /// The exit code of the command + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? ExitCode { get => this._exitCode; } + + /// Backing field for property. + private global::System.DateTime? _finishedAt; + + /// The time when the command finished. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public global::System.DateTime? FinishedAt { get => this._finishedAt; } + + /// Backing field for property. + private string _log; + + /// The command output. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Log { get => this._log; } + + /// Internal Acessors for ExitCode + int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal.ExitCode { get => this._exitCode; set { {_exitCode = value;} } } + + /// Internal Acessors for FinishedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal.FinishedAt { get => this._finishedAt; set { {_finishedAt = value;} } } + + /// Internal Acessors for Log + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal.Log { get => this._log; set { {_log = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for Reason + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal.Reason { get => this._reason; set { {_reason = value;} } } + + /// Internal Acessors for StartedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal.StartedAt { get => this._startedAt; set { {_startedAt = value;} } } + + /// Backing field for property. + private string _provisioningState; + + /// provisioning State + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _reason; + + /// An explanation of why provisioningState is set to failed (if so). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Reason { get => this._reason; } + + /// Backing field for property. + private global::System.DateTime? _startedAt; + + /// The time when the command started. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public global::System.DateTime? StartedAt { get => this._startedAt; } + + /// Creates an new instance. + public CommandResultProperties() + { + + } + } + /// The results of a run command + public partial interface ICommandResultProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The exit code of the command + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The exit code of the command", + SerializedName = @"exitCode", + PossibleTypes = new [] { typeof(int) })] + int? ExitCode { get; } + /// The time when the command finished. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The time when the command finished.", + SerializedName = @"finishedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? FinishedAt { get; } + /// The command output. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The command output.", + SerializedName = @"logs", + PossibleTypes = new [] { typeof(string) })] + string Log { get; } + /// provisioning State + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"provisioning State", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// An explanation of why provisioningState is set to failed (if so). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"An explanation of why provisioningState is set to failed (if so).", + SerializedName = @"reason", + PossibleTypes = new [] { typeof(string) })] + string Reason { get; } + /// The time when the command started. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The time when the command started.", + SerializedName = @"startedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartedAt { get; } + + } + /// The results of a run command + internal partial interface ICommandResultPropertiesInternal + + { + /// The exit code of the command + int? ExitCode { get; set; } + /// The time when the command finished. + global::System.DateTime? FinishedAt { get; set; } + /// The command output. + string Log { get; set; } + /// provisioning State + string ProvisioningState { get; set; } + /// An explanation of why provisioningState is set to failed (if so). + string Reason { get; set; } + /// The time when the command started. + global::System.DateTime? StartedAt { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.json.cs new file mode 100644 index 000000000000..06f431b56eb4 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CommandResultProperties.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The results of a run command + public partial class CommandResultProperties + { + + /// + /// 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 CommandResultProperties(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;} + {_exitCode = If( json?.PropertyT("exitCode"), out var __jsonExitCode) ? (int?)__jsonExitCode : ExitCode;} + {_startedAt = If( json?.PropertyT("startedAt"), out var __jsonStartedAt) ? global::System.DateTime.TryParse((string)__jsonStartedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonStartedAtValue) ? __jsonStartedAtValue : StartedAt : StartedAt;} + {_finishedAt = If( json?.PropertyT("finishedAt"), out var __jsonFinishedAt) ? global::System.DateTime.TryParse((string)__jsonFinishedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonFinishedAtValue) ? __jsonFinishedAtValue : FinishedAt : FinishedAt;} + {_log = If( json?.PropertyT("logs"), out var __jsonLogs) ? (string)__jsonLogs : (string)Log;} + {_reason = If( json?.PropertyT("reason"), out var __jsonReason) ? (string)__jsonReason : (string)Reason;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new CommandResultProperties(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.IncludeReadOnly)) + { + 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 ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._exitCode ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._exitCode) : null, "exitCode" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._startedAt ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._startedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "startedAt" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._finishedAt ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._finishedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "finishedAt" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._log)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._log.ToString()) : null, "logs" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._reason)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._reason.ToString()) : null, "reason" ,container.Add ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.PowerShell.cs similarity index 81% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.PowerShell.cs index c6a355dc30c8..d06c62034c01 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class ContainerServiceLinuxProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,21 +70,21 @@ internal ContainerServiceLinuxProfile(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Ssh")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).Ssh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration) content.GetValueForProperty("Ssh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).Ssh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).Ssh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration) content.GetValueForProperty("Ssh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).Ssh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); } if (content.Contains("AdminUsername")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).AdminUsername = (string) content.GetValueForProperty("AdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).AdminUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).AdminUsername = (string) content.GetValueForProperty("AdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).AdminUsername, global::System.Convert.ToString); } if (content.Contains("SshPublicKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKeyTypeConverter.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. @@ -99,41 +99,41 @@ internal ContainerServiceLinuxProfile(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Ssh")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).Ssh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration) content.GetValueForProperty("Ssh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).Ssh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).Ssh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration) content.GetValueForProperty("Ssh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).Ssh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); } if (content.Contains("AdminUsername")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).AdminUsername = (string) content.GetValueForProperty("AdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).AdminUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).AdminUsername = (string) content.GetValueForProperty("AdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).AdminUsername, global::System.Convert.ToString); } if (content.Contains("SshPublicKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); } 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.Api20200901.IContainerServiceLinuxProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ContainerServiceLinuxProfile(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.Api20200901.IContainerServiceLinuxProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ContainerServiceLinuxProfile(content); } @@ -143,7 +143,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContain /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.TypeConverter.cs index 3fb1adf1f7d7..40a5dcdd5c98 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.cs similarity index 72% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.cs index 374a50551541..eb69b1c82be7 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Profile for Linux VMs in the container service cluster. public partial class ContainerServiceLinuxProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal { /// Backing field for property. @@ -21,20 +21,20 @@ public partial class ContainerServiceLinuxProfile : public string AdminUsername { get => this._adminUsername; set => this._adminUsername = value; } /// Internal Acessors for Ssh - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfileInternal.Ssh { get => (this._ssh = this._ssh ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfiguration()); set { {_ssh = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal.Ssh { get => (this._ssh = this._ssh ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshConfiguration()); set { {_ssh = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration _ssh; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration _ssh; - /// SSH configuration for Linux-based VMs running on Azure. + /// The SSH configuration for Linux-based VMs running on Azure. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration Ssh { get => (this._ssh = this._ssh ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfiguration()); set => this._ssh = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration Ssh { get => (this._ssh = this._ssh ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshConfiguration()); set => this._ssh = value; } /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfigurationInternal)Ssh).PublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfigurationInternal)Ssh).PublicKey = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfigurationInternal)Ssh).PublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfigurationInternal)Ssh).PublicKey = value ; } /// Creates an new instance. public ContainerServiceLinuxProfile() @@ -55,15 +55,15 @@ public partial interface IContainerServiceLinuxProfile : PossibleTypes = new [] { typeof(string) })] string AdminUsername { get; set; } /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified.", + Description = @"The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified.", SerializedName = @"publicKeys", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] SshPublicKey { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] SshPublicKey { get; set; } } /// Profile for Linux VMs in the container service cluster. @@ -72,12 +72,12 @@ internal partial interface IContainerServiceLinuxProfileInternal { /// The administrator username to use for Linux VMs. string AdminUsername { get; set; } - /// SSH configuration for Linux-based VMs running on Azure. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration Ssh { get; set; } + /// The SSH configuration for Linux-based VMs running on Azure. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration Ssh { get; set; } /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] SshPublicKey { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] SshPublicKey { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.json.cs index 233cb7e0f706..aa41e363c969 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceLinuxProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceLinuxProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -65,19 +65,19 @@ internal ContainerServiceLinuxProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Run { return; } - {_ssh = If( json?.PropertyT("ssh"), out var __jsonSsh) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshConfiguration.FromJson(__jsonSsh) : Ssh;} + {_ssh = If( json?.PropertyT("ssh"), out var __jsonSsh) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshConfiguration.FromJson(__jsonSsh) : Ssh;} {_adminUsername = If( json?.PropertyT("adminUsername"), out var __jsonAdminUsername) ? (string)__jsonAdminUsername : (string)AdminUsername;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceLinuxProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ContainerServiceLinuxProfile(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.PowerShell.cs similarity index 50% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.PowerShell.cs index 98923ba56b92..52cb9ad9d4d0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class ContainerServiceNetworkProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,85 +70,133 @@ internal ContainerServiceNetworkProfile(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("LoadBalancerProfile")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("LoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("LoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("NatGatewayProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfile) content.GetValueForProperty("NatGatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterNatGatewayProfileTypeConverter.ConvertFrom); } if (content.Contains("NetworkPlugin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin?) content.GetValueForProperty("NetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin?) content.GetValueForProperty("NetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin.CreateFrom); + } + if (content.Contains("NetworkPluginMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPluginMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode?) content.GetValueForProperty("NetworkPluginMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPluginMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode.CreateFrom); } if (content.Contains("NetworkPolicy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy?) content.GetValueForProperty("NetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy?) content.GetValueForProperty("NetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy.CreateFrom); } if (content.Contains("NetworkMode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode?) content.GetValueForProperty("NetworkMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode?) content.GetValueForProperty("NetworkMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode.CreateFrom); + } + if (content.Contains("NetworkDataplane")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkDataplane = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane?) content.GetValueForProperty("NetworkDataplane",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkDataplane, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane.CreateFrom); } if (content.Contains("PodCidr")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).PodCidr = (string) content.GetValueForProperty("PodCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).PodCidr, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).PodCidr = (string) content.GetValueForProperty("PodCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).PodCidr, global::System.Convert.ToString); } if (content.Contains("ServiceCidr")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).ServiceCidr = (string) content.GetValueForProperty("ServiceCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).ServiceCidr, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ServiceCidr = (string) content.GetValueForProperty("ServiceCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ServiceCidr, global::System.Convert.ToString); } if (content.Contains("DnsServiceIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).DnsServiceIP = (string) content.GetValueForProperty("DnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).DnsServiceIP, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).DnsServiceIP = (string) content.GetValueForProperty("DnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).DnsServiceIP, global::System.Convert.ToString); } if (content.Contains("DockerBridgeCidr")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr = (string) content.GetValueForProperty("DockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr = (string) content.GetValueForProperty("DockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr, global::System.Convert.ToString); } if (content.Contains("OutboundType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType?) content.GetValueForProperty("OutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType?) content.GetValueForProperty("OutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType.CreateFrom); } if (content.Contains("LoadBalancerSku")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku?) content.GetValueForProperty("LoadBalancerSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku?) content.GetValueForProperty("LoadBalancerSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku.CreateFrom); + } + if (content.Contains("PodCidrs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).PodCidrs = (string[]) content.GetValueForProperty("PodCidrs",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).PodCidrs, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ServiceCidrs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ServiceCidrs = (string[]) content.GetValueForProperty("ServiceCidrs",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ServiceCidrs, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("IPFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).IPFamily = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily[]) content.GetValueForProperty("IPFamily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).IPFamily, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily.CreateFrom)); } if (content.Contains("LoadBalancerProfileManagedOutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); } if (content.Contains("LoadBalancerProfileOutboundIPPrefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("LoadBalancerProfileOutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("LoadBalancerProfileOutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); } if (content.Contains("LoadBalancerProfileOutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("LoadBalancerProfileOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("LoadBalancerProfileOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); } if (content.Contains("LoadBalancerProfileEffectiveOutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("LoadBalancerProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("LoadBalancerProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } if (content.Contains("LoadBalancerProfileAllocatedOutboundPort")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileAllocatedOutboundPort = (int?) content.GetValueForProperty("LoadBalancerProfileAllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileAllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileAllocatedOutboundPort = (int?) content.GetValueForProperty("LoadBalancerProfileAllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileAllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("LoadBalancerProfileIdleTimeoutInMinute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("LoadBalancerProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("LoadBalancerProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LoadBalancerProfileEnableMultipleStandardLoadBalancer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEnableMultipleStandardLoadBalancer = (bool?) content.GetValueForProperty("LoadBalancerProfileEnableMultipleStandardLoadBalancer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEnableMultipleStandardLoadBalancer, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NatGatewayProfileManagedOutboundIPProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileManagedOutboundIPProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile) content.GetValueForProperty("NatGatewayProfileManagedOutboundIPProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileManagedOutboundIPProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterManagedOutboundIPProfileTypeConverter.ConvertFrom); + } + if (content.Contains("NatGatewayProfileEffectiveOutboundIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("NatGatewayProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("NatGatewayProfileIdleTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("NatGatewayProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("ManagedOutboundIPCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ManagedOutboundIPCountIpv6")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCountIpv6 = (int?) content.GetValueForProperty("ManagedOutboundIPCountIpv6",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCountIpv6, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("OutboundIPPrefixPublicIpprefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } if (content.Contains("OutboundIPPublicIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("ManagedOutboundIPProfileCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPProfileCount = (int?) content.GetValueForProperty("ManagedOutboundIPProfileCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPProfileCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -163,105 +211,153 @@ internal ContainerServiceNetworkProfile(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("LoadBalancerProfile")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("LoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile) content.GetValueForProperty("LoadBalancerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("NatGatewayProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfile) content.GetValueForProperty("NatGatewayProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterNatGatewayProfileTypeConverter.ConvertFrom); } if (content.Contains("NetworkPlugin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin?) content.GetValueForProperty("NetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPlugin = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin?) content.GetValueForProperty("NetworkPlugin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPlugin, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin.CreateFrom); + } + if (content.Contains("NetworkPluginMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPluginMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode?) content.GetValueForProperty("NetworkPluginMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPluginMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode.CreateFrom); } if (content.Contains("NetworkPolicy")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy?) content.GetValueForProperty("NetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy?) content.GetValueForProperty("NetworkPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy.CreateFrom); } if (content.Contains("NetworkMode")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode?) content.GetValueForProperty("NetworkMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).NetworkMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode?) content.GetValueForProperty("NetworkMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode.CreateFrom); + } + if (content.Contains("NetworkDataplane")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkDataplane = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane?) content.GetValueForProperty("NetworkDataplane",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NetworkDataplane, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane.CreateFrom); } if (content.Contains("PodCidr")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).PodCidr = (string) content.GetValueForProperty("PodCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).PodCidr, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).PodCidr = (string) content.GetValueForProperty("PodCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).PodCidr, global::System.Convert.ToString); } if (content.Contains("ServiceCidr")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).ServiceCidr = (string) content.GetValueForProperty("ServiceCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).ServiceCidr, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ServiceCidr = (string) content.GetValueForProperty("ServiceCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ServiceCidr, global::System.Convert.ToString); } if (content.Contains("DnsServiceIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).DnsServiceIP = (string) content.GetValueForProperty("DnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).DnsServiceIP, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).DnsServiceIP = (string) content.GetValueForProperty("DnsServiceIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).DnsServiceIP, global::System.Convert.ToString); } if (content.Contains("DockerBridgeCidr")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr = (string) content.GetValueForProperty("DockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr = (string) content.GetValueForProperty("DockerBridgeCidr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).DockerBridgeCidr, global::System.Convert.ToString); } if (content.Contains("OutboundType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType?) content.GetValueForProperty("OutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType?) content.GetValueForProperty("OutboundType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType.CreateFrom); } if (content.Contains("LoadBalancerSku")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku?) content.GetValueForProperty("LoadBalancerSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku?) content.GetValueForProperty("LoadBalancerSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku.CreateFrom); + } + if (content.Contains("PodCidrs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).PodCidrs = (string[]) content.GetValueForProperty("PodCidrs",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).PodCidrs, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ServiceCidrs")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ServiceCidrs = (string[]) content.GetValueForProperty("ServiceCidrs",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ServiceCidrs, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("IPFamily")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).IPFamily = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily[]) content.GetValueForProperty("IPFamily",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).IPFamily, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily.CreateFrom)); } if (content.Contains("LoadBalancerProfileManagedOutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("LoadBalancerProfileManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); } if (content.Contains("LoadBalancerProfileOutboundIPPrefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("LoadBalancerProfileOutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("LoadBalancerProfileOutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); } if (content.Contains("LoadBalancerProfileOutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("LoadBalancerProfileOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("LoadBalancerProfileOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); } if (content.Contains("LoadBalancerProfileEffectiveOutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("LoadBalancerProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("LoadBalancerProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } if (content.Contains("LoadBalancerProfileAllocatedOutboundPort")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileAllocatedOutboundPort = (int?) content.GetValueForProperty("LoadBalancerProfileAllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileAllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileAllocatedOutboundPort = (int?) content.GetValueForProperty("LoadBalancerProfileAllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileAllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("LoadBalancerProfileIdleTimeoutInMinute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("LoadBalancerProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("LoadBalancerProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LoadBalancerProfileEnableMultipleStandardLoadBalancer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEnableMultipleStandardLoadBalancer = (bool?) content.GetValueForProperty("LoadBalancerProfileEnableMultipleStandardLoadBalancer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).LoadBalancerProfileEnableMultipleStandardLoadBalancer, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NatGatewayProfileManagedOutboundIPProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileManagedOutboundIPProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile) content.GetValueForProperty("NatGatewayProfileManagedOutboundIPProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileManagedOutboundIPProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterManagedOutboundIPProfileTypeConverter.ConvertFrom); + } + if (content.Contains("NatGatewayProfileEffectiveOutboundIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileEffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("NatGatewayProfileEffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileEffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("NatGatewayProfileIdleTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileIdleTimeoutInMinute = (int?) content.GetValueForProperty("NatGatewayProfileIdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).NatGatewayProfileIdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("ManagedOutboundIPCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ManagedOutboundIPCountIpv6")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCountIpv6 = (int?) content.GetValueForProperty("ManagedOutboundIPCountIpv6",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPCountIpv6, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("OutboundIPPrefixPublicIpprefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } if (content.Contains("OutboundIPPublicIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfileInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("ManagedOutboundIPProfileCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPProfileCount = (int?) content.GetValueForProperty("ManagedOutboundIPProfileCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal)this).ManagedOutboundIPProfileCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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.Api20200901.IContainerServiceNetworkProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ContainerServiceNetworkProfile(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.Api20200901.IContainerServiceNetworkProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ContainerServiceNetworkProfile(content); } @@ -271,7 +367,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContain /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.TypeConverter.cs index ad65bdc1ba80..d919d9a588f6 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.cs new file mode 100644 index 000000000000..c8032105786a --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.cs @@ -0,0 +1,590 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Profile of network configuration. + public partial class ContainerServiceNetworkProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal + { + + /// Backing field for property. + private string _dnsServiceIP; + + /// + /// 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 DnsServiceIP { get => this._dnsServiceIP; set => this._dnsServiceIP = value; } + + /// Backing field for property. + private string _dockerBridgeCidr; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string DockerBridgeCidr { get => this._dockerBridgeCidr; set => this._dockerBridgeCidr = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily[] _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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily[] IPFamily { get => this._iPFamily; set => this._iPFamily = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile _loadBalancerProfile; + + /// Profile of the cluster load balancer. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile LoadBalancerProfile { get => (this._loadBalancerProfile = this._loadBalancerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfile()); set => this._loadBalancerProfile = value; } + + /// + /// The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default + /// value is 0 which results in Azure dynamically allocating ports. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? LoadBalancerProfileAllocatedOutboundPort { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).AllocatedOutboundPort; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).AllocatedOutboundPort = value ?? default(int); } + + /// The effective outbound IP resources of the cluster load balancer. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EffectiveOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EffectiveOutboundIP = value ?? null /* arrayOf */; } + + /// Enable multiple standard load balancers per AKS cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? LoadBalancerProfileEnableMultipleStandardLoadBalancer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EnableMultipleStandardLoadBalancer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).EnableMultipleStandardLoadBalancer = value ?? default(bool); } + + /// + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 30 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? LoadBalancerProfileIdleTimeoutInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).IdleTimeoutInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).IdleTimeoutInMinute = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? _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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? LoadBalancerSku { get => this._loadBalancerSku; set => this._loadBalancerSku = value; } + + /// + /// The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? ManagedOutboundIPCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIPCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIPCount = value ?? default(int); } + + /// + /// The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? ManagedOutboundIPCountIpv6 { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIPCountIpv6; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIPCountIpv6 = value ?? default(int); } + + /// + /// The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). + /// The default value is 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? ManagedOutboundIPProfileCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).ManagedOutboundIPProfileCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).ManagedOutboundIPProfileCount = value ?? default(int); } + + /// Internal Acessors for LoadBalancerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal.LoadBalancerProfile { get => (this._loadBalancerProfile = this._loadBalancerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfile()); set { {_loadBalancerProfile = value;} } } + + /// Internal Acessors for LoadBalancerProfileManagedOutboundIP + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal.LoadBalancerProfileManagedOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).ManagedOutboundIP = value; } + + /// Internal Acessors for LoadBalancerProfileOutboundIP + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal.LoadBalancerProfileOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIP = value; } + + /// Internal Acessors for LoadBalancerProfileOutboundIPPrefix + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal.LoadBalancerProfileOutboundIPPrefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefix = value; } + + /// Internal Acessors for NatGatewayProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal.NatGatewayProfile { get => (this._natGatewayProfile = this._natGatewayProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterNatGatewayProfile()); set { {_natGatewayProfile = value;} } } + + /// Internal Acessors for NatGatewayProfileManagedOutboundIPProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfileInternal.NatGatewayProfileManagedOutboundIPProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).ManagedOutboundIPProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).ManagedOutboundIPProfile = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfile _natGatewayProfile; + + /// Profile of the cluster NAT gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfile NatGatewayProfile { get => (this._natGatewayProfile = this._natGatewayProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterNatGatewayProfile()); set => this._natGatewayProfile = value; } + + /// The effective outbound IP resources of the cluster NAT gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] NatGatewayProfileEffectiveOutboundIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).EffectiveOutboundIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).EffectiveOutboundIP = value ?? null /* arrayOf */; } + + /// + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 4 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? NatGatewayProfileIdleTimeoutInMinute { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).IdleTimeoutInMinute; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)NatGatewayProfile).IdleTimeoutInMinute = value ?? default(int); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane? _networkDataplane; + + /// Network dataplane used in the Kubernetes cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane? NetworkDataplane { get => this._networkDataplane; set => this._networkDataplane = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? _networkMode; + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkMode { get => this._networkMode; set => this._networkMode = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? _networkPlugin; + + /// Network plugin used for building the Kubernetes network. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkPlugin { get => this._networkPlugin; set => this._networkPlugin = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode? _networkPluginMode; + + /// The mode the network plugin should use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode? NetworkPluginMode { get => this._networkPluginMode; set => this._networkPluginMode = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? _networkPolicy; + + /// Network policy used for building the Kubernetes network. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkPolicy { get => this._networkPolicy; set => this._networkPolicy = value; } + + /// A list of public IP prefix resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] OutboundIPPrefixPublicIpprefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefixPublicIpprefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPrefixPublicIpprefix = value ?? null /* arrayOf */; } + + /// A list of public IP resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] OutboundIPPublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)LoadBalancerProfile).OutboundIPPublicIP = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? _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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? OutboundType { get => this._outboundType; set => this._outboundType = value; } + + /// Backing field for property. + private string _podCidr; + + /// A CIDR notation IP range from which to assign pod IPs when kubenet is used. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string PodCidr { get => this._podCidr; set => this._podCidr = value; } + + /// Backing field for property. + private string[] _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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string[] PodCidrs { get => this._podCidrs; set => this._podCidrs = value; } + + /// Backing field for property. + private string _serviceCidr; + + /// + /// 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.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ServiceCidr { get => this._serviceCidr; set => this._serviceCidr = value; } + + /// Backing field for property. + private string[] _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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string[] ServiceCidrs { get => this._serviceCidrs; set => this._serviceCidrs = value; } + + /// Creates an new instance. + public ContainerServiceNetworkProfile() + { + + } + } + /// Profile of network configuration. + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + PossibleTypes = new [] { typeof(string) })] + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"ipFamilies", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily[] IPFamily { get; set; } + /// + /// The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default + /// value is 0 which results in Azure dynamically allocating ports. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports.", + SerializedName = @"allocatedOutboundPorts", + PossibleTypes = new [] { typeof(int) })] + int? LoadBalancerProfileAllocatedOutboundPort { get; set; } + /// The effective outbound IP resources of the cluster load balancer. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The effective outbound IP resources of the cluster load balancer.", + SerializedName = @"effectiveOutboundIPs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get; set; } + /// Enable multiple standard load balancers per AKS cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable multiple standard load balancers per AKS cluster or not.", + SerializedName = @"enableMultipleStandardLoadBalancers", + PossibleTypes = new [] { typeof(bool) })] + bool? LoadBalancerProfileEnableMultipleStandardLoadBalancer { get; set; } + /// + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 30 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value is 30 minutes.", + SerializedName = @"idleTimeoutInMinutes", + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"loadBalancerSku", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? LoadBalancerSku { get; set; } + /// + /// The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? ManagedOutboundIPCount { get; set; } + /// + /// The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. ", + SerializedName = @"countIPv6", + PossibleTypes = new [] { typeof(int) })] + int? ManagedOutboundIPCountIpv6 { get; set; } + /// + /// The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). + /// The default value is 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. ", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? ManagedOutboundIPProfileCount { get; set; } + /// The effective outbound IP resources of the cluster NAT gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The effective outbound IP resources of the cluster NAT gateway.", + SerializedName = @"effectiveOutboundIPs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] NatGatewayProfileEffectiveOutboundIP { get; set; } + /// + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 4 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value is 4 minutes.", + SerializedName = @"idleTimeoutInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? NatGatewayProfileIdleTimeoutInMinute { get; set; } + /// Network dataplane used in the Kubernetes cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Network dataplane used in the Kubernetes cluster.", + SerializedName = @"networkDataplane", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane? NetworkDataplane { get; set; } + /// This cannot be specified if networkPlugin is anything other than 'azure'. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This cannot be specified if networkPlugin is anything other than 'azure'.", + SerializedName = @"networkMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkMode { get; set; } + /// Network plugin used for building the Kubernetes network. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Network plugin used for building the Kubernetes network.", + SerializedName = @"networkPlugin", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkPlugin { get; set; } + /// The mode the network plugin should use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The mode the network plugin should use.", + SerializedName = @"networkPluginMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode? NetworkPluginMode { get; set; } + /// Network policy used for building the Kubernetes network. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Network policy used for building the Kubernetes network.", + SerializedName = @"networkPolicy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkPolicy { get; set; } + /// A list of public IP prefix resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of public IP prefix resources.", + SerializedName = @"publicIPPrefixes", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } + /// A list of public IP resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A list of public IP resources.", + SerializedName = @"publicIPs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"outboundType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? 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( + Required = false, + ReadOnly = false, + Description = @"A CIDR notation IP range from which to assign pod IPs when kubenet is used.", + SerializedName = @"podCidr", + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"podCidrs", + PossibleTypes = new [] { typeof(string) })] + string[] PodCidrs { 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( + Required = false, + ReadOnly = false, + Description = @"A CIDR notation IP range from which to assign service cluster IPs. It must not overlap with any Subnet IP ranges.", + SerializedName = @"serviceCidr", + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"serviceCidrs", + PossibleTypes = new [] { typeof(string) })] + string[] ServiceCidrs { get; set; } + + } + /// Profile of network configuration. + internal partial interface IContainerServiceNetworkProfileInternal + + { + /// + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily[] IPFamily { get; set; } + /// Profile of the cluster load balancer. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile LoadBalancerProfile { get; set; } + /// + /// The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default + /// value is 0 which results in Azure dynamically allocating ports. + /// + int? LoadBalancerProfileAllocatedOutboundPort { get; set; } + /// The effective outbound IP resources of the cluster load balancer. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] LoadBalancerProfileEffectiveOutboundIP { get; set; } + /// Enable multiple standard load balancers per AKS cluster or not. + bool? LoadBalancerProfileEnableMultipleStandardLoadBalancer { get; set; } + /// + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 30 minutes. + /// + int? LoadBalancerProfileIdleTimeoutInMinute { get; set; } + /// Desired managed outbound IPs for the cluster load balancer. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs LoadBalancerProfileManagedOutboundIP { get; set; } + /// Desired outbound IP resources for the cluster load balancer. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs LoadBalancerProfileOutboundIP { get; set; } + /// Desired outbound IP Prefix resources for the cluster load balancer. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku? LoadBalancerSku { get; set; } + /// + /// The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 1. + /// + int? ManagedOutboundIPCount { get; set; } + /// + /// The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + /// + int? ManagedOutboundIPCountIpv6 { get; set; } + /// + /// The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). + /// The default value is 1. + /// + int? ManagedOutboundIPProfileCount { get; set; } + /// Profile of the cluster NAT gateway. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfile NatGatewayProfile { get; set; } + /// The effective outbound IP resources of the cluster NAT gateway. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] NatGatewayProfileEffectiveOutboundIP { get; set; } + /// + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 4 minutes. + /// + int? NatGatewayProfileIdleTimeoutInMinute { get; set; } + /// Profile of the managed outbound IP resources of the cluster NAT gateway. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile NatGatewayProfileManagedOutboundIPProfile { get; set; } + /// Network dataplane used in the Kubernetes cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane? NetworkDataplane { get; set; } + /// This cannot be specified if networkPlugin is anything other than 'azure'. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode? NetworkMode { get; set; } + /// Network plugin used for building the Kubernetes network. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin? NetworkPlugin { get; set; } + /// The mode the network plugin should use. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode? NetworkPluginMode { get; set; } + /// Network policy used for building the Kubernetes network. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy? NetworkPolicy { get; set; } + /// A list of public IP prefix resources. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } + /// A list of public IP resources. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] 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). + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType? 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. + /// + string[] PodCidrs { 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. + /// + string[] ServiceCidrs { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.json.cs similarity index 67% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.json.cs index 1a38e95d3367..8c87cc1aa0a9 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceNetworkProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceNetworkProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -65,27 +65,33 @@ internal ContainerServiceNetworkProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.R { return; } - {_loadBalancerProfile = If( json?.PropertyT("loadBalancerProfile"), out var __jsonLoadBalancerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfile.FromJson(__jsonLoadBalancerProfile) : LoadBalancerProfile;} + {_loadBalancerProfile = If( json?.PropertyT("loadBalancerProfile"), out var __jsonLoadBalancerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfile.FromJson(__jsonLoadBalancerProfile) : LoadBalancerProfile;} + {_natGatewayProfile = If( json?.PropertyT("natGatewayProfile"), out var __jsonNatGatewayProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterNatGatewayProfile.FromJson(__jsonNatGatewayProfile) : NatGatewayProfile;} {_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;} {_networkMode = If( json?.PropertyT("networkMode"), out var __jsonNetworkMode) ? (string)__jsonNetworkMode : (string)NetworkMode;} + {_networkDataplane = If( json?.PropertyT("networkDataplane"), out var __jsonNetworkDataplane) ? (string)__jsonNetworkDataplane : (string)NetworkDataplane;} {_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.ToArray(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;} + {_serviceCidrs = If( json?.PropertyT("serviceCidrs"), out var __jsonServiceCidrs) ? If( __jsonServiceCidrs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : ServiceCidrs;} + {_iPFamily = If( json?.PropertyT("ipFamilies"), out var __jsonIPFamilies) ? If( __jsonIPFamilies as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __l) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__l, (__k)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily) (__k is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __j ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily)(__j.ToString()) : ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily)""))) ))() : null : IPFamily;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceNetworkProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ContainerServiceNetworkProfile(json) : null; } @@ -110,15 +116,45 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro return container; } 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 != (((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 ); AddIf( null != (((object)this._networkMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._networkMode.ToString()) : null, "networkMode" ,container.Add ); + AddIf( null != (((object)this._networkDataplane)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._networkDataplane.ToString()) : null, "networkDataplane" ,container.Add ); 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) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._podCidrs ) + { + 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("podCidrs",__w); + } + if (null != this._serviceCidrs) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __s in this._serviceCidrs ) + { + 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("serviceCidrs",__r); + } + if (null != this._iPFamily) + { + var __m = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __n in this._iPFamily ) + { + 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("ipFamilies",__m); + } AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.PowerShell.cs similarity index 86% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.PowerShell.cs index 73b229872fba..0f53612690bd 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class ContainerServiceSshConfiguration partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,13 +70,13 @@ internal ContainerServiceSshConfiguration(global::System.Collections.IDictionary // actually deserialize if (content.Contains("PublicKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfigurationInternal)this).PublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[]) content.GetValueForProperty("PublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfigurationInternal)this).PublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfigurationInternal)this).PublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[]) content.GetValueForProperty("PublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfigurationInternal)this).PublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKeyTypeConverter.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. @@ -91,35 +91,35 @@ internal ContainerServiceSshConfiguration(global::System.Management.Automation.P // actually deserialize if (content.Contains("PublicKey")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfigurationInternal)this).PublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[]) content.GetValueForProperty("PublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfigurationInternal)this).PublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfigurationInternal)this).PublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[]) content.GetValueForProperty("PublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfigurationInternal)this).PublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); } 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ContainerServiceSshConfiguration(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ContainerServiceSshConfiguration(content); } @@ -129,7 +129,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContain /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.TypeConverter.cs index 0c05a7a94ef9..9e52bf2f3056 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.cs similarity index 75% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.cs index 7acaeccf18c2..3e62fceb5e04 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.cs @@ -3,24 +3,24 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// SSH configuration for Linux-based VMs running on Azure. public partial class ContainerServiceSshConfiguration : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfigurationInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfigurationInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] _publicKey; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] _publicKey; /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] PublicKey { get => this._publicKey; set => this._publicKey = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] PublicKey { get => this._publicKey; set => this._publicKey = value; } /// Creates an new instance. public ContainerServiceSshConfiguration() @@ -33,15 +33,15 @@ public partial interface IContainerServiceSshConfiguration : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified.", + Description = @"The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified.", SerializedName = @"publicKeys", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] PublicKey { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] PublicKey { get; set; } } /// SSH configuration for Linux-based VMs running on Azure. @@ -49,9 +49,9 @@ internal partial interface IContainerServiceSshConfigurationInternal { /// - /// The list of SSH public keys used to authenticate with Linux-based VMs. Only expect one key specified. + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey[] PublicKey { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] PublicKey { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.json.cs index 0aeb9d16a41a..b3a2446e2e89 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshConfiguration.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshConfiguration.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -65,18 +65,18 @@ internal ContainerServiceSshConfiguration(Microsoft.Azure.PowerShell.Cmdlets.Aks { return; } - {_publicKey = If( json?.PropertyT("publicKeys"), out var __jsonPublicKeys) ? If( __jsonPublicKeys as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceSshPublicKey.FromJson(__u) )) ))() : null : PublicKey;} + {_publicKey = If( json?.PropertyT("publicKeys"), out var __jsonPublicKeys) ? If( __jsonPublicKeys as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKey.FromJson(__u) )) ))() : null : PublicKey;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ContainerServiceSshConfiguration(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.PowerShell.cs similarity index 89% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.PowerShell.cs index fec494ea811f..a251eeb0af03 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class ContainerServiceSshPublicKey partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,13 +70,13 @@ internal ContainerServiceSshPublicKey(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("KeyData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKeyInternal)this).KeyData = (string) content.GetValueForProperty("KeyData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKeyInternal)this).KeyData, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKeyInternal)this).KeyData = (string) content.GetValueForProperty("KeyData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKeyInternal)this).KeyData, 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. @@ -91,33 +91,33 @@ internal ContainerServiceSshPublicKey(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("KeyData")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKeyInternal)this).KeyData = (string) content.GetValueForProperty("KeyData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKeyInternal)this).KeyData, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKeyInternal)this).KeyData = (string) content.GetValueForProperty("KeyData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKeyInternal)this).KeyData, 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.Api20200901.IContainerServiceSshPublicKey DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ContainerServiceSshPublicKey(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.Api20200901.IContainerServiceSshPublicKey DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ContainerServiceSshPublicKey(content); } @@ -127,7 +127,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContain /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.TypeConverter.cs index 7d4e4b38b487..8da42a43dea1 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.cs similarity index 92% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.cs index 2c5525fac855..fbe1b15a2cab 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Contains information about SSH certificate public key data. public partial class ContainerServiceSshPublicKey : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKeyInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKeyInternal { /// Backing field for property. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.json.cs index 8feac1f8a225..fdeb1735d452 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceSshPublicKey.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ContainerServiceSshPublicKey.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -70,13 +70,13 @@ internal ContainerServiceSshPublicKey(Microsoft.Azure.PowerShell.Cmdlets.Aks.Run } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceSshPublicKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ContainerServiceSshPublicKey(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.PowerShell.cs new file mode 100644 index 000000000000..087066ea6347 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.PowerShell.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Data used when creating a target resource from a source resource. + [System.ComponentModel.TypeConverter(typeof(CreationDataTypeConverter))] + public partial class CreationData + { + + /// + /// 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); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal CreationData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationDataInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationDataInternal)this).SourceResourceId, 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 CreationData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationDataInternal)this).SourceResourceId = (string) content.GetValueForProperty("SourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationDataInternal)this).SourceResourceId, 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.Api20230201.ICreationData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new CreationData(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.Api20230201.ICreationData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new CreationData(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.Api20230201.ICreationData 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(); + } + /// Data used when creating a target resource from a source resource. + [System.ComponentModel.TypeConverter(typeof(CreationDataTypeConverter))] + public partial interface ICreationData + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.TypeConverter.cs similarity index 88% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.TypeConverter.cs index 3fa38535f4df..d4c02e131396 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.TypeConverter.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { 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 ResourceTagsTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class CreationDataTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class ResourceTagsTypeConverter : global::System.Management.Autom 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.Api20200901.IResourceTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData).IsAssignableFrom(type)) { return sourceValue; } try { - return ResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return CreationData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourc } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ResourceTags.DeserializeFromPSObject(sourceValue); + return CreationData.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ResourceTags.DeserializeFromDictionary(sourceValue); + return CreationData.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.cs new file mode 100644 index 000000000000..6767b851b2f4 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Data used when creating a target resource from a source resource. + public partial class CreationData : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationDataInternal + { + + /// Backing field for property. + private string _sourceResourceId; + + /// This is the ARM ID of the source object to be used to create the target object. + [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 CreationData() + { + + } + } + /// Data used when creating a target resource from a source resource. + public partial interface ICreationData : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// This is the ARM ID of the source object to be used to create the target object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the ARM ID of the source object to be used to create the target object.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string SourceResourceId { get; set; } + + } + /// Data used when creating a target resource from a source resource. + internal partial interface ICreationDataInternal + + { + /// This is the ARM ID of the source object to be used to create the target object. + string SourceResourceId { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.json.cs new file mode 100644 index 000000000000..4f8a21552a76 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CreationData.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Data used when creating a target resource from a source resource. + public partial class CreationData + { + + /// + /// 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 CreationData(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_sourceResourceId = If( json?.PropertyT("sourceResourceId"), out var __jsonSourceResourceId) ? (string)__jsonSourceResourceId : (string)SourceResourceId;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new CreationData(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._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 ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.PowerShell.cs similarity index 87% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.PowerShell.cs index 592c3efd154d..076cbe149999 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,7 +55,7 @@ public partial class CredentialResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,17 +70,17 @@ internal CredentialResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal)this).Value = (byte[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal)this).Value, i => i); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal)this).Value = (byte[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal)this).Value, i => i); } 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. @@ -95,37 +95,37 @@ internal CredentialResult(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal)this).Value = (byte[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal)this).Value, i => i); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal)this).Value = (byte[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal)this).Value, i => i); } 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.Api20200901.ICredentialResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CredentialResult(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.Api20200901.ICredentialResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CredentialResult(content); } @@ -135,7 +135,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredent /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.TypeConverter.cs index 33dc42d76fa6..52a1939b48bb 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.cs similarity index 89% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.cs index ac1d8c56717b..53f4ac99c662 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// The credential result response. public partial class CredentialResult : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal { /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Value - byte[] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultInternal.Value { get => this._value; set { {_value = value;} } } + byte[] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. private string _name; diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.json.cs index 71a91203182b..4fe17f9eae7e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResult.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -71,13 +71,13 @@ internal CredentialResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.Js } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new CredentialResult(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.PowerShell.cs similarity index 84% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.PowerShell.cs index 3550b3924675..d7668507fcfd 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.PowerShell.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// The list of credential result response. + /// The list credential result response. [System.ComponentModel.TypeConverter(typeof(CredentialResultsTypeConverter))] public partial class CredentialResults { @@ -55,7 +55,7 @@ public partial class CredentialResults partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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. @@ -70,13 +70,13 @@ internal CredentialResults(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Kubeconfig")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultsInternal)this).Kubeconfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult[]) content.GetValueForProperty("Kubeconfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultsInternal)this).Kubeconfig, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CredentialResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultsInternal)this).Kubeconfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult[]) content.GetValueForProperty("Kubeconfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultsInternal)this).Kubeconfig, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CredentialResultTypeConverter.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. @@ -91,33 +91,33 @@ internal CredentialResults(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Kubeconfig")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultsInternal)this).Kubeconfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult[]) content.GetValueForProperty("Kubeconfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultsInternal)this).Kubeconfig, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CredentialResultTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultsInternal)this).Kubeconfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult[]) content.GetValueForProperty("Kubeconfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultsInternal)this).Kubeconfig, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CredentialResultTypeConverter.ConvertFrom)); } 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.Api20200901.ICredentialResults DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResults DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new CredentialResults(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.Api20200901.ICredentialResults DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResults DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new CredentialResults(content); } @@ -127,14 +127,14 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredent /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResults FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResults 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(); } - /// The list of credential result response. + /// The list credential result response. [System.ComponentModel.TypeConverter(typeof(CredentialResultsTypeConverter))] public partial interface ICredentialResults diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.TypeConverter.cs index e1ab9cb64c9b..8f975d94701e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResults ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResults ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResults).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResults).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.cs similarity index 71% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.cs index ba8a57ac3cd5..0437bb060517 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.cs @@ -3,25 +3,25 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// The list of credential result response. + /// The list credential result response. public partial class CredentialResults : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResults, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultsInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResults, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult[] _kubeconfig; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult[] _kubeconfig; /// Base64-encoded Kubernetes configuration file. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult[] Kubeconfig { get => this._kubeconfig; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult[] Kubeconfig { get => this._kubeconfig; } /// Internal Acessors for Kubeconfig - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult[] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResultsInternal.Kubeconfig { get => this._kubeconfig; set { {_kubeconfig = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult[] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResultsInternal.Kubeconfig { get => this._kubeconfig; set { {_kubeconfig = value;} } } /// Creates an new instance. public CredentialResults() @@ -29,7 +29,7 @@ public CredentialResults() } } - /// The list of credential result response. + /// The list credential result response. public partial interface ICredentialResults : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { @@ -39,16 +39,16 @@ public partial interface ICredentialResults : ReadOnly = true, Description = @"Base64-encoded Kubernetes configuration file.", SerializedName = @"kubeconfigs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult[] Kubeconfig { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult[] Kubeconfig { get; } } - /// The list of credential result response. + /// The list credential result response. internal partial interface ICredentialResultsInternal { /// Base64-encoded Kubernetes configuration file. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult[] Kubeconfig { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult[] Kubeconfig { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.json.cs similarity index 93% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.json.cs index bc7abcc54562..6e028e15ed94 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/CredentialResults.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/CredentialResults.json.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// The list of credential result response. + /// The list credential result response. public partial class CredentialResults { @@ -65,18 +65,18 @@ internal CredentialResults(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.J { return; } - {_kubeconfig = If( json?.PropertyT("kubeconfigs"), out var __jsonKubeconfigs) ? If( __jsonKubeconfigs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResult) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.CredentialResult.FromJson(__u) )) ))() : null : Kubeconfig;} + {_kubeconfig = If( json?.PropertyT("kubeconfigs"), out var __jsonKubeconfigs) ? If( __jsonKubeconfigs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResult) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CredentialResult.FromJson(__u) )) ))() : null : Kubeconfig;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResults. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResults. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResults. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResults. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ICredentialResults FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICredentialResults FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new CredentialResults(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.PowerShell.cs new file mode 100644 index 000000000000..409e5ceb56af --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// A domain name that AKS agent nodes are reaching at. + [System.ComponentModel.TypeConverter(typeof(EndpointDependencyTypeConverter))] + public partial class EndpointDependency + { + + /// + /// 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); + + /// + /// 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.Api20230201.IEndpointDependency DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new EndpointDependency(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.Api20230201.IEndpointDependency DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new EndpointDependency(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal EndpointDependency(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DomainName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependencyInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependencyInternal)this).DomainName, global::System.Convert.ToString); + } + if (content.Contains("EndpointDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependencyInternal)this).EndpointDetail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail[]) content.GetValueForProperty("EndpointDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependencyInternal)this).EndpointDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.EndpointDetailTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal EndpointDependency(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DomainName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependencyInternal)this).DomainName = (string) content.GetValueForProperty("DomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependencyInternal)this).DomainName, global::System.Convert.ToString); + } + if (content.Contains("EndpointDetail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependencyInternal)this).EndpointDetail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail[]) content.GetValueForProperty("EndpointDetail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependencyInternal)this).EndpointDetail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.EndpointDetailTypeConverter.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.Api20230201.IEndpointDependency 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(); + } + /// A domain name that AKS agent nodes are reaching at. + [System.ComponentModel.TypeConverter(typeof(EndpointDependencyTypeConverter))] + public partial interface IEndpointDependency + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.TypeConverter.cs similarity index 87% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.TypeConverter.cs index bf808662a1b7..7ca2d18c019c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.TypeConverter.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { 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 BaseManagedClusterTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class EndpointDependencyTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class BaseManagedClusterTypeConverter : global::System.Management 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.Api20200901.IBaseManagedCluster ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedCluster).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency).IsAssignableFrom(type)) { return sourceValue; } try { - return BaseManagedCluster.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return EndpointDependency.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseMan } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return BaseManagedCluster.DeserializeFromPSObject(sourceValue); + return EndpointDependency.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return BaseManagedCluster.DeserializeFromDictionary(sourceValue); + return EndpointDependency.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.cs new file mode 100644 index 000000000000..e76d46afe613 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// A domain name that AKS agent nodes are reaching at. + public partial class EndpointDependency : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependencyInternal + { + + /// Backing field for property. + private string _domainName; + + /// The domain name of the dependency. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string DomainName { get => this._domainName; set => this._domainName = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail[] _endpointDetail; + + /// The Ports and Protocols used when connecting to domainName. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail[] EndpointDetail { get => this._endpointDetail; set => this._endpointDetail = value; } + + /// Creates an new instance. + public EndpointDependency() + { + + } + } + /// A domain name that AKS agent nodes are reaching at. + public partial interface IEndpointDependency : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The domain name of the dependency. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The domain name of the dependency.", + SerializedName = @"domainName", + PossibleTypes = new [] { typeof(string) })] + string DomainName { get; set; } + /// The Ports and Protocols used when connecting to domainName. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Ports and Protocols used when connecting to domainName.", + SerializedName = @"endpointDetails", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail[] EndpointDetail { get; set; } + + } + /// A domain name that AKS agent nodes are reaching at. + internal partial interface IEndpointDependencyInternal + + { + /// The domain name of the dependency. + string DomainName { get; set; } + /// The Ports and Protocols used when connecting to domainName. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail[] EndpointDetail { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.json.cs new file mode 100644 index 000000000000..8609ef5c19ba --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDependency.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// A domain name that AKS agent nodes are reaching at. + public partial class EndpointDependency + { + + /// + /// 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 EndpointDependency(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_domainName = If( json?.PropertyT("domainName"), out var __jsonDomainName) ? (string)__jsonDomainName : (string)DomainName;} + {_endpointDetail = If( json?.PropertyT("endpointDetails"), out var __jsonEndpointDetails) ? If( __jsonEndpointDetails as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.EndpointDetail.FromJson(__u) )) ))() : null : EndpointDetail;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new EndpointDependency(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._domainName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._domainName.ToString()) : null, "domainName" ,container.Add ); + if (null != this._endpointDetail) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._endpointDetail ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("endpointDetails",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.PowerShell.cs similarity index 60% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.PowerShell.cs index 11534b2d4aed..b4851181b250 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.PowerShell.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Profile for Windows VMs in the container service cluster. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterWindowsProfileTypeConverter))] - public partial class ManagedClusterWindowsProfile + /// connect information from the AKS agent nodes to a single endpoint. + [System.ComponentModel.TypeConverter(typeof(EndpointDetailTypeConverter))] + public partial class EndpointDetail { /// @@ -55,44 +55,37 @@ public partial class ManagedClusterWindowsProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IManagedClusterWindowsProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ManagedClusterWindowsProfile(content); + return new EndpointDetail(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.Api20200901.IManagedClusterWindowsProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ManagedClusterWindowsProfile(content); + return new EndpointDetail(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.Api20200901.IManagedClusterWindowsProfile 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 ManagedClusterWindowsProfile(global::System.Collections.IDictionary content) + internal EndpointDetail(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -101,27 +94,31 @@ internal ManagedClusterWindowsProfile(global::System.Collections.IDictionary con return; } // actually deserialize - if (content.Contains("AdminUsername")) + if (content.Contains("IPAddress")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).IPAddress, global::System.Convert.ToString); + } + if (content.Contains("Port")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).AdminUsername = (string) content.GetValueForProperty("AdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).AdminUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Port = (int?) content.GetValueForProperty("Port",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Port, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } - if (content.Contains("AdminPassword")) + if (content.Contains("Protocol")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).AdminPassword = (string) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).AdminPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Protocol = (string) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Protocol, global::System.Convert.ToString); } - if (content.Contains("LicenseType")) + if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Description, 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 ManagedClusterWindowsProfile(global::System.Management.Automation.PSObject content) + internal EndpointDetail(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -130,29 +127,40 @@ internal ManagedClusterWindowsProfile(global::System.Management.Automation.PSObj return; } // actually deserialize - if (content.Contains("AdminUsername")) + if (content.Contains("IPAddress")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).AdminUsername = (string) content.GetValueForProperty("AdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).AdminUsername, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).IPAddress = (string) content.GetValueForProperty("IPAddress",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).IPAddress, global::System.Convert.ToString); } - if (content.Contains("AdminPassword")) + if (content.Contains("Port")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).AdminPassword = (string) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).AdminPassword, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Port = (int?) content.GetValueForProperty("Port",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Port, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } - if (content.Contains("LicenseType")) + if (content.Contains("Protocol")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfileInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Protocol = (string) content.GetValueForProperty("Protocol",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Protocol, global::System.Convert.ToString); + } + if (content.Contains("Description")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal)this).Description, global::System.Convert.ToString); } 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.Api20230201.IEndpointDetail 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(); } - /// Profile for Windows VMs in the container service cluster. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterWindowsProfileTypeConverter))] - public partial interface IManagedClusterWindowsProfile + /// connect information from the AKS agent nodes to a single endpoint. + [System.ComponentModel.TypeConverter(typeof(EndpointDetailTypeConverter))] + public partial interface IEndpointDetail { diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.TypeConverter.cs new file mode 100644 index 000000000000..e03aec95e65a --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class EndpointDetailTypeConverter : 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.Api20230201.IEndpointDetail ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return EndpointDetail.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return EndpointDetail.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return EndpointDetail.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.cs new file mode 100644 index 000000000000..79169e15778f --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// connect information from the AKS agent nodes to a single endpoint. + public partial class EndpointDetail : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetailInternal + { + + /// Backing field for property. + private string _description; + + /// Description of the detail + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Description { get => this._description; set => this._description = value; } + + /// Backing field for property. + private string _iPAddress; + + /// An IP Address that Domain Name currently resolves to. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string IPAddress { get => this._iPAddress; set => this._iPAddress = value; } + + /// Backing field for property. + private int? _port; + + /// The port an endpoint is connected to. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? Port { get => this._port; set => this._port = value; } + + /// Backing field for property. + private string _protocol; + + /// The protocol used for connection + [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 EndpointDetail() + { + + } + } + /// connect information from the AKS agent nodes to a single endpoint. + public partial interface IEndpointDetail : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Description of the detail + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Description of the detail", + SerializedName = @"description", + PossibleTypes = new [] { typeof(string) })] + string Description { get; set; } + /// An IP Address that Domain Name currently resolves to. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"An IP Address that Domain Name currently resolves to.", + SerializedName = @"ipAddress", + PossibleTypes = new [] { typeof(string) })] + string IPAddress { get; set; } + /// The port an endpoint is connected to. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The port an endpoint is connected to.", + SerializedName = @"port", + PossibleTypes = new [] { typeof(int) })] + int? Port { get; set; } + /// The protocol used for connection + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The protocol used for connection", + SerializedName = @"protocol", + PossibleTypes = new [] { typeof(string) })] + string Protocol { get; set; } + + } + /// connect information from the AKS agent nodes to a single endpoint. + internal partial interface IEndpointDetailInternal + + { + /// Description of the detail + string Description { get; set; } + /// An IP Address that Domain Name currently resolves to. + string IPAddress { get; set; } + /// The port an endpoint is connected to. + int? Port { get; set; } + /// The protocol used for connection + string Protocol { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.json.cs new file mode 100644 index 000000000000..b947942b5511 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/EndpointDetail.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// connect information from the AKS agent nodes to a single endpoint. + public partial class EndpointDetail + { + + /// + /// 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 EndpointDetail(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_iPAddress = If( json?.PropertyT("ipAddress"), out var __jsonIPAddress) ? (string)__jsonIPAddress : (string)IPAddress;} + {_port = If( json?.PropertyT("port"), out var __jsonPort) ? (int?)__jsonPort : Port;} + {_protocol = If( json?.PropertyT("protocol"), out var __jsonProtocol) ? (string)__jsonProtocol : (string)Protocol;} + {_description = If( json?.PropertyT("description"), out var __jsonDescription) ? (string)__jsonDescription : (string)Description;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDetail FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new EndpointDetail(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._iPAddress)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._iPAddress.ToString()) : null, "ipAddress" ,container.Add ); + AddIf( null != this._port ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._port) : null, "port" ,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 ); + AddIf( null != (((object)this._description)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._description.ToString()) : null, "description" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.PowerShell.cs new file mode 100644 index 000000000000..af50d9394e3d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The complex type of the extended location. + [System.ComponentModel.TypeConverter(typeof(ExtendedLocationTypeConverter))] + public partial class ExtendedLocation + { + + /// + /// 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); + + /// + /// 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.Api20230201.IExtendedLocation DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ExtendedLocation(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.Api20230201.IExtendedLocation DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ExtendedLocation(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal ExtendedLocation(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.Api20230201.IExtendedLocationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ExtendedLocation(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.Api20230201.IExtendedLocationInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes.CreateFrom); + } + 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.Api20230201.IExtendedLocation 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(); + } + /// The complex type of the extended location. + [System.ComponentModel.TypeConverter(typeof(ExtendedLocationTypeConverter))] + public partial interface IExtendedLocation + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.TypeConverter.cs new file mode 100644 index 000000000000..cd3297479560 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ExtendedLocationTypeConverter : 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.Api20230201.IExtendedLocation ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ExtendedLocation.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ExtendedLocation.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ExtendedLocation.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.cs new file mode 100644 index 000000000000..9fd6fbc313eb --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The complex type of the extended location. + public partial class ExtendedLocation : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal + { + + /// Backing field for property. + private string _name; + + /// The name of the extended location. + [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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes? _type; + + /// The type of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes? Type { get => this._type; set => this._type = value; } + + /// Creates an new instance. + public ExtendedLocation() + { + + } + } + /// The complex type of the extended location. + public partial interface IExtendedLocation : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the extended location.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The type of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of the extended location.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes? Type { get; set; } + + } + /// The complex type of the extended location. + internal partial interface IExtendedLocationInternal + + { + /// The name of the extended location. + string Name { get; set; } + /// The type of the extended location. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes? Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.json.cs new file mode 100644 index 000000000000..31fded0e6982 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ExtendedLocation.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The complex type of the extended location. + public partial class ExtendedLocation + { + + /// + /// 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 ExtendedLocation(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;} + {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} + AfterFromJson(json); + } + + /// + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ExtendedLocation(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 ); + 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 ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.PowerShell.cs new file mode 100644 index 000000000000..a821a2642041 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.PowerShell.cs @@ -0,0 +1,226 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + 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. + /// + [System.ComponentModel.TypeConverter(typeof(KubeletConfigTypeConverter))] + public partial class KubeletConfig + { + + /// + /// 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); + + /// + /// 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.Api20230201.IKubeletConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new KubeletConfig(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.Api20230201.IKubeletConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new KubeletConfig(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.Api20230201.IKubeletConfig 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 KubeletConfig(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CpuManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuManagerPolicy = (string) content.GetValueForProperty("CpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("CpuCfsQuota")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuCfsQuota = (bool?) content.GetValueForProperty("CpuCfsQuota",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuCfsQuota, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CpuCfsQuotaPeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuCfsQuotaPeriod = (string) content.GetValueForProperty("CpuCfsQuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuCfsQuotaPeriod, global::System.Convert.ToString); + } + if (content.Contains("ImageGcHighThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ImageGcHighThreshold = (int?) content.GetValueForProperty("ImageGcHighThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ImageGcHighThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ImageGcLowThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ImageGcLowThreshold = (int?) content.GetValueForProperty("ImageGcLowThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ImageGcLowThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TopologyManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).TopologyManagerPolicy = (string) content.GetValueForProperty("TopologyManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).TopologyManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("AllowedUnsafeSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).AllowedUnsafeSysctl = (string[]) content.GetValueForProperty("AllowedUnsafeSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).AllowedUnsafeSysctl, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("FailSwapOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).FailSwapOn = (bool?) content.GetValueForProperty("FailSwapOn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).FailSwapOn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ContainerLogMaxSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ContainerLogMaxSizeMb = (int?) content.GetValueForProperty("ContainerLogMaxSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ContainerLogMaxSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ContainerLogMaxFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ContainerLogMaxFile = (int?) content.GetValueForProperty("ContainerLogMaxFile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ContainerLogMaxFile, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PodMaxPid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).PodMaxPid = (int?) content.GetValueForProperty("PodMaxPid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).PodMaxPid, (__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 KubeletConfig(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CpuManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuManagerPolicy = (string) content.GetValueForProperty("CpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("CpuCfsQuota")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuCfsQuota = (bool?) content.GetValueForProperty("CpuCfsQuota",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuCfsQuota, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CpuCfsQuotaPeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuCfsQuotaPeriod = (string) content.GetValueForProperty("CpuCfsQuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).CpuCfsQuotaPeriod, global::System.Convert.ToString); + } + if (content.Contains("ImageGcHighThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ImageGcHighThreshold = (int?) content.GetValueForProperty("ImageGcHighThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ImageGcHighThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ImageGcLowThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ImageGcLowThreshold = (int?) content.GetValueForProperty("ImageGcLowThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ImageGcLowThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("TopologyManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).TopologyManagerPolicy = (string) content.GetValueForProperty("TopologyManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).TopologyManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("AllowedUnsafeSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).AllowedUnsafeSysctl = (string[]) content.GetValueForProperty("AllowedUnsafeSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).AllowedUnsafeSysctl, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("FailSwapOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).FailSwapOn = (bool?) content.GetValueForProperty("FailSwapOn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).FailSwapOn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ContainerLogMaxSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ContainerLogMaxSizeMb = (int?) content.GetValueForProperty("ContainerLogMaxSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ContainerLogMaxSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ContainerLogMaxFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ContainerLogMaxFile = (int?) content.GetValueForProperty("ContainerLogMaxFile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).ContainerLogMaxFile, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("PodMaxPid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).PodMaxPid = (int?) content.GetValueForProperty("PodMaxPid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)this).PodMaxPid, (__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(); + } + /// 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 + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.TypeConverter.cs new file mode 100644 index 000000000000..f16d66a2bceb --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class KubeletConfigTypeConverter : 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.Api20230201.IKubeletConfig ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return KubeletConfig.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return KubeletConfig.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return KubeletConfig.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.cs new file mode 100644 index 000000000000..8d49fe42c0f0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.cs @@ -0,0 +1,262 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + 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. + /// + public partial class KubeletConfig : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal + { + + /// Backing field for property. + private string[] _allowedUnsafeSysctl; + + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string[] AllowedUnsafeSysctl { get => this._allowedUnsafeSysctl; set => this._allowedUnsafeSysctl = value; } + + /// Backing field for property. + private int? _containerLogMaxFile; + + /// + /// The maximum number of container log files that can be present for a container. The number must be ≥ 2. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? ContainerLogMaxFile { get => this._containerLogMaxFile; set => this._containerLogMaxFile = value; } + + /// Backing field for property. + private int? _containerLogMaxSizeMb; + + /// The maximum size (e.g. 10Mi) of container log file before it is rotated. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? ContainerLogMaxSizeMb { get => this._containerLogMaxSizeMb; set => this._containerLogMaxSizeMb = value; } + + /// Backing field for property. + private bool? _cpuCfsQuota; + + /// 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; } + + /// Backing field for property. + 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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string CpuCfsQuotaPeriod { get => this._cpuCfsQuotaPeriod; set => this._cpuCfsQuotaPeriod = value; } + + /// Backing field for property. + 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) + /// for more information. Allowed values are 'none' and 'static'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string CpuManagerPolicy { get => this._cpuManagerPolicy; set => this._cpuManagerPolicy = value; } + + /// Backing field for property. + private bool? _failSwapOn; + + /// + /// If set to true it will make the Kubelet fail to start if swap is enabled on the node. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? FailSwapOn { get => this._failSwapOn; set => this._failSwapOn = value; } + + /// Backing field for property. + private int? _imageGcHighThreshold; + + /// 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% + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? ImageGcLowThreshold { get => this._imageGcLowThreshold; set => this._imageGcLowThreshold = value; } + + /// Backing field for property. + private int? _podMaxPid; + + /// The maximum number of processes per pod. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? PodMaxPid { get => this._podMaxPid; set => this._podMaxPid = value; } + + /// Backing field for property. + private string _topologyManagerPolicy; + + /// + /// 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)] + public string TopologyManagerPolicy { get => this._topologyManagerPolicy; set => this._topologyManagerPolicy = value; } + + /// Creates an new instance. + public KubeletConfig() + { + + } + } + /// 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 + { + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).", + SerializedName = @"allowedUnsafeSysctls", + PossibleTypes = new [] { typeof(string) })] + string[] AllowedUnsafeSysctl { get; set; } + /// + /// The maximum number of container log files that can be present for a container. The number must be ≥ 2. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of container log files that can be present for a container. The number must be ≥ 2.", + SerializedName = @"containerLogMaxFiles", + PossibleTypes = new [] { typeof(int) })] + int? ContainerLogMaxFile { get; set; } + /// The maximum size (e.g. 10Mi) of container log file before it is rotated. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum size (e.g. 10Mi) of container log file before it is rotated.", + SerializedName = @"containerLogMaxSizeMB", + PossibleTypes = new [] { typeof(int) })] + int? ContainerLogMaxSizeMb { get; set; } + /// The default is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + 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) + /// for more information. Allowed values are 'none' and 'static'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + SerializedName = @"cpuManagerPolicy", + PossibleTypes = new [] { typeof(string) })] + string CpuManagerPolicy { get; set; } + /// + /// If set to true it will make the Kubelet fail to start if swap is enabled on the node. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If set to true it will make the Kubelet fail to start if swap is enabled on the node.", + SerializedName = @"failSwapOn", + PossibleTypes = new [] { typeof(bool) })] + bool? FailSwapOn { get; set; } + /// To disable image garbage collection, set to 100. The default is 85% + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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% + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This cannot be set higher than imageGcHighThreshold. The default is 80%", + SerializedName = @"imageGcLowThreshold", + PossibleTypes = new [] { typeof(int) })] + int? ImageGcLowThreshold { get; set; } + /// The maximum number of processes per pod. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of processes per pod.", + SerializedName = @"podMaxPids", + 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 default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + 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. + internal partial interface IKubeletConfigInternal + + { + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + string[] AllowedUnsafeSysctl { get; set; } + /// + /// The maximum number of container log files that can be present for a container. The number must be ≥ 2. + /// + 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. + 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'. + /// + 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) + /// for more information. Allowed values are 'none' and 'static'. + /// + string CpuManagerPolicy { get; set; } + /// + /// 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% + int? ImageGcHighThreshold { get; set; } + /// 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 default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + /// + string TopologyManagerPolicy { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.json.cs new file mode 100644 index 000000000000..eb738b8d25fe --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/KubeletConfig.json.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + 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. + /// + public partial class KubeletConfig + { + + /// + /// 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.Api20230201.IKubeletConfig. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new KubeletConfig(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 KubeletConfig(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_cpuManagerPolicy = If( json?.PropertyT("cpuManagerPolicy"), out var __jsonCpuManagerPolicy) ? (string)__jsonCpuManagerPolicy : (string)CpuManagerPolicy;} + {_cpuCfsQuota = If( json?.PropertyT("cpuCfsQuota"), out var __jsonCpuCfsQuota) ? (bool?)__jsonCpuCfsQuota : CpuCfsQuota;} + {_cpuCfsQuotaPeriod = If( json?.PropertyT("cpuCfsQuotaPeriod"), out var __jsonCpuCfsQuotaPeriod) ? (string)__jsonCpuCfsQuotaPeriod : (string)CpuCfsQuotaPeriod;} + {_imageGcHighThreshold = If( json?.PropertyT("imageGcHighThreshold"), out var __jsonImageGcHighThreshold) ? (int?)__jsonImageGcHighThreshold : ImageGcHighThreshold;} + {_imageGcLowThreshold = If( json?.PropertyT("imageGcLowThreshold"), out var __jsonImageGcLowThreshold) ? (int?)__jsonImageGcLowThreshold : ImageGcLowThreshold;} + {_topologyManagerPolicy = If( json?.PropertyT("topologyManagerPolicy"), out var __jsonTopologyManagerPolicy) ? (string)__jsonTopologyManagerPolicy : (string)TopologyManagerPolicy;} + {_allowedUnsafeSysctl = If( json?.PropertyT("allowedUnsafeSysctls"), out var __jsonAllowedUnsafeSysctls) ? If( __jsonAllowedUnsafeSysctls as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : AllowedUnsafeSysctl;} + {_failSwapOn = If( json?.PropertyT("failSwapOn"), out var __jsonFailSwapOn) ? (bool?)__jsonFailSwapOn : FailSwapOn;} + {_containerLogMaxSizeMb = If( json?.PropertyT("containerLogMaxSizeMB"), out var __jsonContainerLogMaxSizeMb) ? (int?)__jsonContainerLogMaxSizeMb : ContainerLogMaxSizeMb;} + {_containerLogMaxFile = If( json?.PropertyT("containerLogMaxFiles"), out var __jsonContainerLogMaxFiles) ? (int?)__jsonContainerLogMaxFiles : ContainerLogMaxFile;} + {_podMaxPid = If( json?.PropertyT("podMaxPids"), out var __jsonPodMaxPids) ? (int?)__jsonPodMaxPids : PodMaxPid;} + 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._cpuManagerPolicy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._cpuManagerPolicy.ToString()) : null, "cpuManagerPolicy" ,container.Add ); + AddIf( null != this._cpuCfsQuota ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._cpuCfsQuota) : null, "cpuCfsQuota" ,container.Add ); + AddIf( null != (((object)this._cpuCfsQuotaPeriod)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._cpuCfsQuotaPeriod.ToString()) : null, "cpuCfsQuotaPeriod" ,container.Add ); + AddIf( null != this._imageGcHighThreshold ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._imageGcHighThreshold) : null, "imageGcHighThreshold" ,container.Add ); + AddIf( null != this._imageGcLowThreshold ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._imageGcLowThreshold) : null, "imageGcLowThreshold" ,container.Add ); + AddIf( null != (((object)this._topologyManagerPolicy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._topologyManagerPolicy.ToString()) : null, "topologyManagerPolicy" ,container.Add ); + if (null != this._allowedUnsafeSysctl) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._allowedUnsafeSysctl ) + { + 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("allowedUnsafeSysctls",__w); + } + AddIf( null != this._failSwapOn ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._failSwapOn) : null, "failSwapOn" ,container.Add ); + AddIf( null != this._containerLogMaxSizeMb ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._containerLogMaxSizeMb) : null, "containerLogMaxSizeMB" ,container.Add ); + AddIf( null != this._containerLogMaxFile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._containerLogMaxFile) : null, "containerLogMaxFiles" ,container.Add ); + AddIf( null != this._podMaxPid ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._podMaxPid) : null, "podMaxPids" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.PowerShell.cs new file mode 100644 index 000000000000..9afab80cd5c5 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + 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. + /// + [System.ComponentModel.TypeConverter(typeof(LinuxOSConfigTypeConverter))] + public partial class LinuxOSConfig + { + + /// + /// 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); + + /// + /// 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.Api20230201.ILinuxOSConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new LinuxOSConfig(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.Api20230201.ILinuxOSConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new LinuxOSConfig(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.Api20230201.ILinuxOSConfig 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 LinuxOSConfig(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TransparentHugePageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).TransparentHugePageEnabled = (string) content.GetValueForProperty("TransparentHugePageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).TransparentHugePageEnabled, global::System.Convert.ToString); + } + if (content.Contains("TransparentHugePageDefrag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).TransparentHugePageDefrag = (string) content.GetValueForProperty("TransparentHugePageDefrag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).TransparentHugePageDefrag, global::System.Convert.ToString); + } + if (content.Contains("SwapFileSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).SwapFileSizeMb = (int?) content.GetValueForProperty("SwapFileSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).SwapFileSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Sysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).Sysctl = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) content.GetValueForProperty("Sysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).Sysctl, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfigTypeConverter.ConvertFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal LinuxOSConfig(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TransparentHugePageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).TransparentHugePageEnabled = (string) content.GetValueForProperty("TransparentHugePageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).TransparentHugePageEnabled, global::System.Convert.ToString); + } + if (content.Contains("TransparentHugePageDefrag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).TransparentHugePageDefrag = (string) content.GetValueForProperty("TransparentHugePageDefrag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).TransparentHugePageDefrag, global::System.Convert.ToString); + } + if (content.Contains("SwapFileSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).SwapFileSizeMb = (int?) content.GetValueForProperty("SwapFileSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).SwapFileSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("Sysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).Sysctl = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) content.GetValueForProperty("Sysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)this).Sysctl, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfigTypeConverter.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(); + } + /// 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 + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.TypeConverter.cs new file mode 100644 index 000000000000..3cbaaeb7e043 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class LinuxOSConfigTypeConverter : 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.Api20230201.ILinuxOSConfig ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return LinuxOSConfig.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return LinuxOSConfig.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return LinuxOSConfig.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.cs new file mode 100644 index 000000000000..1fdb1fb54881 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.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.Api20230201 +{ + 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. + /// + public partial class LinuxOSConfig : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal + { + + /// Backing field for property. + private int? _swapFileSizeMb; + + /// The size in MB of a swap file that will be created on each node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? SwapFileSizeMb { get => this._swapFileSizeMb; set => this._swapFileSizeMb = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig _sysctl; + + /// Sysctl settings for Linux agent nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig Sysctl { get => (this._sysctl = this._sysctl ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfig()); set => this._sysctl = value; } + + /// Backing field for property. + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string TransparentHugePageDefrag { get => this._transparentHugePageDefrag; set => this._transparentHugePageDefrag = value; } + + /// Backing field for property. + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string TransparentHugePageEnabled { get => this._transparentHugePageEnabled; set => this._transparentHugePageEnabled = value; } + + /// Creates an new instance. + public LinuxOSConfig() + { + + } + } + /// 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 + { + /// The size in MB of a swap file that will be created on each node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size in MB of a swap file that will be created on each node.", + SerializedName = @"swapFileSizeMB", + PossibleTypes = new [] { typeof(int) })] + int? SwapFileSizeMb { get; set; } + /// Sysctl settings for Linux agent nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl settings for Linux agent nodes.", + SerializedName = @"sysctls", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + 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. + internal partial interface ILinuxOSConfigInternal + + { + /// The size in MB of a swap file that will be created on each node. + int? SwapFileSizeMb { get; set; } + /// Sysctl settings for Linux agent nodes. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + 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). + /// + string TransparentHugePageEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.json.cs new file mode 100644 index 000000000000..07b316e4a608 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/LinuxOSConfig.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.Api20230201 +{ + 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. + /// + public partial class LinuxOSConfig + { + + /// + /// 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.Api20230201.ILinuxOSConfig. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new LinuxOSConfig(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 LinuxOSConfig(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_transparentHugePageEnabled = If( json?.PropertyT("transparentHugePageEnabled"), out var __jsonTransparentHugePageEnabled) ? (string)__jsonTransparentHugePageEnabled : (string)TransparentHugePageEnabled;} + {_transparentHugePageDefrag = If( json?.PropertyT("transparentHugePageDefrag"), out var __jsonTransparentHugePageDefrag) ? (string)__jsonTransparentHugePageDefrag : (string)TransparentHugePageDefrag;} + {_swapFileSizeMb = If( json?.PropertyT("swapFileSizeMB"), out var __jsonSwapFileSizeMb) ? (int?)__jsonSwapFileSizeMb : SwapFileSizeMb;} + {_sysctl = If( json?.PropertyT("sysctls"), out var __jsonSysctls) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfig.FromJson(__jsonSysctls) : Sysctl;} + 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._transparentHugePageEnabled)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._transparentHugePageEnabled.ToString()) : null, "transparentHugePageEnabled" ,container.Add ); + AddIf( null != (((object)this._transparentHugePageDefrag)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._transparentHugePageDefrag.ToString()) : null, "transparentHugePageDefrag" ,container.Add ); + AddIf( null != this._swapFileSizeMb ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._swapFileSizeMb) : null, "swapFileSizeMB" ,container.Add ); + AddIf( null != this._sysctl ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._sysctl.ToJson(null,serializationMode) : null, "sysctls" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.PowerShell.cs new file mode 100644 index 000000000000..9489789b4a8c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.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.Api20230201 +{ + 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. + /// + [System.ComponentModel.TypeConverter(typeof(MaintenanceConfigurationTypeConverter))] + public partial class MaintenanceConfiguration + { + + /// + /// 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); + + /// + /// 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.Api20230201.IMaintenanceConfiguration DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceConfiguration(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.Api20230201.IMaintenanceConfiguration DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceConfiguration(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.Api20230201.IMaintenanceConfiguration 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 MaintenanceConfiguration(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)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("TimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).TimeInWeek = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[]) content.GetValueForProperty("TimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).TimeInWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("NotAllowedTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).NotAllowedTime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[]) content.GetValueForProperty("NotAllowedTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).NotAllowedTime, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpanTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MaintenanceConfiguration(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfigurationPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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("SystemDataCreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)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("TimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).TimeInWeek = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[]) content.GetValueForProperty("TimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).TimeInWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("NotAllowedTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).NotAllowedTime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[]) content.GetValueForProperty("NotAllowedTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal)this).NotAllowedTime, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpanTypeConverter.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(); + } + /// 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 + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.TypeConverter.cs new file mode 100644 index 000000000000..fd1c7f81cedb --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceConfigurationTypeConverter : 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.Api20230201.IMaintenanceConfiguration ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceConfiguration.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceConfiguration.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceConfiguration.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.cs new file mode 100644 index 000000000000..54f33c6405e4 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.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.Api20230201 +{ + 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. + /// + public partial class MaintenanceConfiguration : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource __subResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.Api20230201.ISubResourceInternal)__subResource).Id; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfigurationProperties()); set { {_property = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Name = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)__subResource).Type = value; } + + /// + /// 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.Api20230201.ISubResourceInternal)__subResource).Name; } + + /// Time slots on which upgrade is not allowed. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[] NotAllowedTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)Property).NotAllowedTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)Property).NotAllowedTime = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationProperties _property; + + /// Properties of a default maintenance configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfigurationProperties()); set => this._property = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData _systemData; + + /// The system metadata relating to this resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[] TimeInWeek { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)Property).TimeInWeek; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)Property).TimeInWeek = value ?? null /* arrayOf */; } + + /// 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.Api20230201.ISubResourceInternal)__subResource).Type; } + + /// Creates an new instance. + public MaintenanceConfiguration() + { + + } + + /// 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); + } + } + /// 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.Api20230201.ISubResource + { + /// Time slots on which upgrade is not allowed. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time slots on which upgrade is not allowed.", + SerializedName = @"notAllowedTime", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[] NotAllowedTime { get; set; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? 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. + /// + [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.", + SerializedName = @"timeInWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[] TimeInWeek { get; set; } + + } + /// 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.Api20230201.ISubResourceInternal + { + /// Time slots on which upgrade is not allowed. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[] NotAllowedTime { get; set; } + /// Properties of a default maintenance configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationProperties Property { get; set; } + /// The system metadata relating to this resource. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[] TimeInWeek { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.json.cs new file mode 100644 index 000000000000..4dbf9887c741 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfiguration.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + 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. + /// + public partial class MaintenanceConfiguration + { + + /// + /// 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.Api20230201.IMaintenanceConfiguration. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MaintenanceConfiguration(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 MaintenanceConfiguration(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.Api20230201.SubResource(json); + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemData.FromJson(__jsonSystemData) : SystemData;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfigurationProperties.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; + } + __subResource?.ToJson(container, serializationMode); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + 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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.PowerShell.cs new file mode 100644 index 000000000000..9237b9be9e0f --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The response from the List maintenance configurations operation. + [System.ComponentModel.TypeConverter(typeof(MaintenanceConfigurationListResultTypeConverter))] + public partial class MaintenanceConfigurationListResult + { + + /// + /// 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); + + /// + /// 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.Api20230201.IMaintenanceConfigurationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceConfigurationListResult(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.Api20230201.IMaintenanceConfigurationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceConfigurationListResult(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.Api20230201.IMaintenanceConfigurationListResult 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 MaintenanceConfigurationListResult(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.Api20230201.IMaintenanceConfigurationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfigurationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResultInternal)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 MaintenanceConfigurationListResult(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.Api20230201.IMaintenanceConfigurationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfigurationTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResultInternal)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(); + } + /// The response from the List maintenance configurations operation. + [System.ComponentModel.TypeConverter(typeof(MaintenanceConfigurationListResultTypeConverter))] + public partial interface IMaintenanceConfigurationListResult + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.TypeConverter.cs similarity index 85% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.TypeConverter.cs index 3ed0419877af..2cba822de670 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.TypeConverter.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { 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 ContainerServiceDiagnosticsProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class MaintenanceConfigurationListResultTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class ContainerServiceDiagnosticsProfileTypeConverter : global::S 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 + /// true if the instance could be converted to a type, otherwise /// false /// public static bool CanConvertFrom(dynamic sourceValue) @@ -96,32 +96,32 @@ 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 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.Api20200901.IContainerServiceDiagnosticsProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResult).IsAssignableFrom(type)) { return sourceValue; } try { - return ContainerServiceDiagnosticsProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return MaintenanceConfigurationListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -129,11 +129,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContain } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ContainerServiceDiagnosticsProfile.DeserializeFromPSObject(sourceValue); + return MaintenanceConfigurationListResult.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ContainerServiceDiagnosticsProfile.DeserializeFromDictionary(sourceValue); + return MaintenanceConfigurationListResult.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.cs new file mode 100644 index 000000000000..bfbff06b3f37 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The response from the List maintenance configurations operation. + public partial class MaintenanceConfigurationListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The URL to get the next set of maintenance configuration 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration[] _value; + + /// The list of maintenance configurations. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public MaintenanceConfigurationListResult() + { + + } + } + /// The response from the List maintenance configurations operation. + public partial interface IMaintenanceConfigurationListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The URL to get the next set of maintenance configuration results. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The URL to get the next set of maintenance configuration results.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// The list of maintenance configurations. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of maintenance configurations.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration[] Value { get; set; } + + } + /// The response from the List maintenance configurations operation. + internal partial interface IMaintenanceConfigurationListResultInternal + + { + /// The URL to get the next set of maintenance configuration results. + string NextLink { get; set; } + /// The list of maintenance configurations. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.json.cs new file mode 100644 index 000000000000..9eac9fe3f088 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationListResult.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The response from the List maintenance configurations operation. + public partial class MaintenanceConfigurationListResult + { + + /// + /// 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.Api20230201.IMaintenanceConfigurationListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MaintenanceConfigurationListResult(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 MaintenanceConfigurationListResult(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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfiguration.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.IncludeReadOnly)) + { + 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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.PowerShell.cs new file mode 100644 index 000000000000..e326fbc700ff --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Properties used to configure planned maintenance for a Managed Cluster. + [System.ComponentModel.TypeConverter(typeof(MaintenanceConfigurationPropertiesTypeConverter))] + public partial class MaintenanceConfigurationProperties + { + + /// + /// 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); + + /// + /// 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.Api20230201.IMaintenanceConfigurationProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new MaintenanceConfigurationProperties(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.Api20230201.IMaintenanceConfigurationProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new MaintenanceConfigurationProperties(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.Api20230201.IMaintenanceConfigurationProperties 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 MaintenanceConfigurationProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)this).TimeInWeek = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[]) content.GetValueForProperty("TimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)this).TimeInWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("NotAllowedTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)this).NotAllowedTime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[]) content.GetValueForProperty("NotAllowedTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)this).NotAllowedTime, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpanTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal MaintenanceConfigurationProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("TimeInWeek")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)this).TimeInWeek = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[]) content.GetValueForProperty("TimeInWeek",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)this).TimeInWeek, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeekTypeConverter.ConvertFrom)); + } + if (content.Contains("NotAllowedTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)this).NotAllowedTime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[]) content.GetValueForProperty("NotAllowedTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal)this).NotAllowedTime, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpanTypeConverter.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(); + } + /// Properties used to configure planned maintenance for a Managed Cluster. + [System.ComponentModel.TypeConverter(typeof(MaintenanceConfigurationPropertiesTypeConverter))] + public partial interface IMaintenanceConfigurationProperties + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.TypeConverter.cs new file mode 100644 index 000000000000..d04cd11a923d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class MaintenanceConfigurationPropertiesTypeConverter : 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.Api20230201.IMaintenanceConfigurationProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return MaintenanceConfigurationProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return MaintenanceConfigurationProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return MaintenanceConfigurationProperties.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.cs new file mode 100644 index 000000000000..0ec08994e000 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Properties used to configure planned maintenance for a Managed Cluster. + public partial class MaintenanceConfigurationProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[] _notAllowedTime; + + /// Time slots on which upgrade is not allowed. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[] NotAllowedTime { get => this._notAllowedTime; set => this._notAllowedTime = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[] _timeInWeek; + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[] TimeInWeek { get => this._timeInWeek; set => this._timeInWeek = value; } + + /// Creates an new instance. + public MaintenanceConfigurationProperties() + { + + } + } + /// Properties used to configure planned maintenance for a Managed Cluster. + public partial interface IMaintenanceConfigurationProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Time slots on which upgrade is not allowed. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Time slots on which upgrade is not allowed.", + SerializedName = @"notAllowedTime", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[] NotAllowedTime { get; set; } + /// + /// 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, + 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.", + SerializedName = @"timeInWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[] TimeInWeek { get; set; } + + } + /// Properties used to configure planned maintenance for a Managed Cluster. + internal partial interface IMaintenanceConfigurationPropertiesInternal + + { + /// Time slots on which upgrade is not allowed. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[] NotAllowedTime { get; set; } + /// + /// 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.Models.Api20230201.ITimeInWeek[] TimeInWeek { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.json.cs new file mode 100644 index 000000000000..f9b570ed23f2 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/MaintenanceConfigurationProperties.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Properties used to configure planned maintenance for a Managed Cluster. + public partial class MaintenanceConfigurationProperties + { + + /// + /// 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.Api20230201.IMaintenanceConfigurationProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfigurationProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new MaintenanceConfigurationProperties(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 MaintenanceConfigurationProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan.FromJson(__p) )) ))() : null : NotAllowedTime;} + 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._timeInWeek) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._timeInWeek ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("timeInWeek",__w); + } + if (null != this._notAllowedTime) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __s in this._notAllowedTime ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("notAllowedTime",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.PowerShell.cs new file mode 100644 index 000000000000..a8776af961ae --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.PowerShell.cs @@ -0,0 +1,1272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterTypeConverter))] + public partial class ManagedCluster + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedCluster DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedCluster(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.Api20230201.IManagedCluster DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedCluster(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.Api20230201.IManagedCluster 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 ManagedCluster(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSkuTypeConverter.ConvertFrom); + } + if (content.Contains("ExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation) content.GetValueForProperty("ExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocation, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ExtendedLocationTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ExtendedLocationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocationName = (string) content.GetValueForProperty("ExtendedLocationName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocationName, global::System.Convert.ToString); + } + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerStateTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName.CreateFrom); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier.CreateFrom); + } + if (content.Contains("ExtendedLocationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocationType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes?) content.GetValueForProperty("ExtendedLocationType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocationType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes.CreateFrom); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile) content.GetValueForProperty("LinuxProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceLinuxProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWindowsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ServicePrincipalProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile) content.GetValueForProperty("ServicePrincipalProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterServicePrincipalProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PodIdentityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile) content.GetValueForProperty("PodIdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterOidcIssuerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AadProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAadProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AutoUpgradeProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoUpgradeProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile) content.GetValueForProperty("AutoUpgradeProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoUpgradeProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAutoUpgradeProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AutoScalerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ApiServerAccessProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile) content.GetValueForProperty("ApiServerAccessProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterApiServerAccessProfileTypeConverter.ConvertFrom); + } + if (content.Contains("HttpProxyConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig) content.GetValueForProperty("HttpProxyConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterHttpProxyConfigTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadAutoScalerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadAutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile) content.GetValueForProperty("WorkloadAutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadAutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AzureMonitorProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureMonitorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile) content.GetValueForProperty("AzureMonitorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureMonitorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("MaxAgentPool")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MaxAgentPool = (int?) content.GetValueForProperty("MaxAgentPool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MaxAgentPool, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("CurrentKubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).CurrentKubernetesVersion = (string) content.GetValueForProperty("CurrentKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).CurrentKubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("DnsPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DnsPrefix, global::System.Convert.ToString); + } + if (content.Contains("FqdnSubdomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).FqdnSubdomain = (string) content.GetValueForProperty("FqdnSubdomain",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).FqdnSubdomain, global::System.Convert.ToString); + } + if (content.Contains("Fqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Fqdn, global::System.Convert.ToString); + } + if (content.Contains("PrivateFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PrivateFqdn = (string) content.GetValueForProperty("PrivateFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PrivateFqdn, global::System.Convert.ToString); + } + if (content.Contains("AzurePortalFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzurePortalFqdn = (string) content.GetValueForProperty("AzurePortalFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzurePortalFqdn, global::System.Convert.ToString); + } + if (content.Contains("AgentPoolProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("AddonProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AddonProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles) content.GetValueForProperty("AddonProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AddonProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAddonProfilesTypeConverter.ConvertFrom); + } + if (content.Contains("NodeResourceGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).NodeResourceGroup = (string) content.GetValueForProperty("NodeResourceGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).NodeResourceGroup, global::System.Convert.ToString); + } + if (content.Contains("EnableRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnablePodSecurityPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("IdentityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile) content.GetValueForProperty("IdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesIdentityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[]) content.GetValueForProperty("PrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PrivateLinkResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DisableLocalAccount = (bool?) content.GetValueForProperty("DisableLocalAccount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DisableLocalAccount, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess.CreateFrom); + } + if (content.Contains("NetworkProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PowerStateCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + } + if (content.Contains("WindowProfileLicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileLicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileLicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); + } + if (content.Contains("AutoUpgradeProfileUpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoUpgradeProfileUpgradeChannel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel?) content.GetValueForProperty("AutoUpgradeProfileUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoUpgradeProfileUpgradeChannel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel.CreateFrom); + } + if (content.Contains("AutoScalerProfileExpander")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileExpander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileExpander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); + } + if (content.Contains("LinuxProfileSsh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxProfileAdminUsername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfileAdminUsername = (string) content.GetValueForProperty("LinuxProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfileAdminUsername, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileGmsaProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileGmsaProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile) content.GetValueForProperty("WindowProfileGmsaProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileGmsaProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowProfileAdminUsername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileAdminUsername = (string) content.GetValueForProperty("WindowProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileAdminUsername, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileAdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileAdminPassword = (string) content.GetValueForProperty("WindowProfileAdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileAdminPassword, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileEnableCsiProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileEnableCsiProxy = (bool?) content.GetValueForProperty("WindowProfileEnableCsiProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileEnableCsiProxy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ServicePrincipalProfileClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfileClientId = (string) content.GetValueForProperty("ServicePrincipalProfileClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfileClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalProfileSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfileSecret = (string) content.GetValueForProperty("ServicePrincipalProfileSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfileSecret, global::System.Convert.ToString); + } + if (content.Contains("PodIdentityProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileEnabled = (bool?) content.GetValueForProperty("PodIdentityProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PodIdentityProfileAllowNetworkPluginKubenet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileAllowNetworkPluginKubenet = (bool?) content.GetValueForProperty("PodIdentityProfileAllowNetworkPluginKubenet",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileAllowNetworkPluginKubenet, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PodIdentityProfileUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[]) content.GetValueForProperty("PodIdentityProfileUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileUserAssignedIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("PodIdentityProfileUserAssignedIdentityException")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileUserAssignedIdentityException = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[]) content.GetValueForProperty("PodIdentityProfileUserAssignedIdentityException",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileUserAssignedIdentityException, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionTypeConverter.ConvertFrom)); + } + if (content.Contains("OidcIssuerProfileIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("OidcIssuerProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileManaged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileManaged = (bool?) content.GetValueForProperty("AadProfileManaged",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileManaged, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileEnableAzureRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileAdminGroupObjectID")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AadProfileClientAppId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileClientAppId, global::System.Convert.ToString); + } + if (content.Contains("AadProfileServerAppId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileServerAppId, global::System.Convert.ToString); + } + if (content.Contains("AadProfileServerAppSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileServerAppSecret = (string) content.GetValueForProperty("AadProfileServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileServerAppSecret, global::System.Convert.ToString); + } + if (content.Contains("AadProfileTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxGracefulTerminationSec")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec = (string) content.GetValueForProperty("AutoScalerProfileMaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxNodeProvisionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxNodeProvisionTime = (string) content.GetValueForProperty("AutoScalerProfileMaxNodeProvisionTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxNodeProvisionTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxTotalUnreadyPercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage = (string) content.GetValueForProperty("AutoScalerProfileMaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileNewPodScaleUpDelay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay = (string) content.GetValueForProperty("AutoScalerProfileNewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileOkTotalUnreadyCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount = (string) content.GetValueForProperty("AutoScalerProfileOkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScanInterval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScanInterval = (string) content.GetValueForProperty("AutoScalerProfileScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScanInterval, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterAdd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterDelete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterFailure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUnneededTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUnreadyTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUtilizationThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileSkipNodesWithLocalStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileSkipNodesWithSystemPod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod, global::System.Convert.ToString); + } + if (content.Contains("ApiServerAccessProfileAuthorizedIPRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange = (string[]) content.GetValueForProperty("ApiServerAccessProfileAuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ApiServerAccessProfileEnablePrivateCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfilePrivateDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfilePrivateDnsZone = (string) content.GetValueForProperty("ApiServerAccessProfilePrivateDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfilePrivateDnsZone, global::System.Convert.ToString); + } + if (content.Contains("ApiServerAccessProfileEnablePrivateClusterPublicFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateClusterPublicFqdn = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateClusterPublicFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateClusterPublicFqdn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfileDisableRunCommand")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileDisableRunCommand = (bool?) content.GetValueForProperty("ApiServerAccessProfileDisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileDisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("HttpProxyConfigHttpProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigHttpProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigHttpProxy, global::System.Convert.ToString); + } + if (content.Contains("HttpProxyConfigHttpsProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigHttpsProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpsProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigHttpsProxy, global::System.Convert.ToString); + } + if (content.Contains("HttpProxyConfigNoProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigNoProxy = (string[]) content.GetValueForProperty("HttpProxyConfigNoProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigNoProxy, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("HttpProxyConfigTrustedCa")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigTrustedCa = (string) content.GetValueForProperty("HttpProxyConfigTrustedCa",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigTrustedCa, global::System.Convert.ToString); + } + if (content.Contains("SecurityProfileDefender")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileDefender = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender) content.GetValueForProperty("SecurityProfileDefender",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileDefender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileAzureKeyVaultKm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileAzureKeyVaultKm = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms) content.GetValueForProperty("SecurityProfileAzureKeyVaultKm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileAzureKeyVaultKm, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKmsTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileWorkloadIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileImageCleaner")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("SecurityProfileImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); + } + if (content.Contains("AzureKeyVaultKmKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); + } + if (content.Contains("StorageProfileDiskCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileDiskCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver) content.GetValueForProperty("StorageProfileDiskCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileDiskCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileFileCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileFileCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver) content.GetValueForProperty("StorageProfileFileCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileFileCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileSnapshotController")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileSnapshotController = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController) content.GetValueForProperty("StorageProfileSnapshotController",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileSnapshotController, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotControllerTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileBlobCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileBlobCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver) content.GetValueForProperty("StorageProfileBlobCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileBlobCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadAutoScalerProfileKeda")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadAutoScalerProfileKeda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("WorkloadAutoScalerProfileKeda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadAutoScalerProfileKeda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); + } + if (content.Contains("AzureMonitorProfileMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureMonitorProfileMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics) content.GetValueForProperty("AzureMonitorProfileMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureMonitorProfileMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); + } + if (content.Contains("GmsaProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileEnabled = (bool?) content.GetValueForProperty("GmsaProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GmsaProfileDnsServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileDnsServer = (string) content.GetValueForProperty("GmsaProfileDnsServer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileDnsServer, global::System.Convert.ToString); + } + if (content.Contains("GmsaProfileRootDomainName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileRootDomainName = (string) content.GetValueForProperty("GmsaProfileRootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileRootDomainName, global::System.Convert.ToString); + } + if (content.Contains("DefenderSecurityMonitoring")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DefenderSecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("DefenderSecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DefenderSecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); + } + if (content.Contains("DefenderLogAnalyticsWorkspaceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DefenderLogAnalyticsWorkspaceResourceId = (string) content.GetValueForProperty("DefenderLogAnalyticsWorkspaceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DefenderLogAnalyticsWorkspaceResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureKeyVaultKmEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmEnabled = (bool?) content.GetValueForProperty("AzureKeyVaultKmEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AzureKeyVaultKmKeyVaultNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes?) content.GetValueForProperty("AzureKeyVaultKmKeyVaultNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes.CreateFrom); + } + if (content.Contains("AzureKeyVaultKmKeyVaultResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyVaultResourceId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyVaultResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyVaultResourceId, global::System.Convert.ToString); + } + if (content.Contains("WorkloadIdentityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ImageCleanerEnabled = (bool?) content.GetValueForProperty("ImageCleanerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ImageCleanerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerIntervalHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ImageCleanerIntervalHour = (int?) content.GetValueForProperty("ImageCleanerIntervalHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ImageCleanerIntervalHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DiskCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DiskCsiDriverEnabled = (bool?) content.GetValueForProperty("DiskCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DiskCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("FileCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).FileCsiDriverEnabled = (bool?) content.GetValueForProperty("FileCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).FileCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SnapshotControllerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SnapshotControllerEnabled = (bool?) content.GetValueForProperty("SnapshotControllerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SnapshotControllerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BlobCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).BlobCsiDriverEnabled = (bool?) content.GetValueForProperty("BlobCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).BlobCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KedaEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KedaEnabled = (bool) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KedaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MetricKubeStateMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MetricKubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("MetricKubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MetricKubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("MetricEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MetricEnabled = (bool) content.GetValueForProperty("MetricEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MetricEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeStateMetricLabelsAllowlist")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); + } + if (content.Contains("KubeStateMetricAnnotationsAllowList")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubeStateMetricAnnotationsAllowList, 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 ManagedCluster(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Sku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Sku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku) content.GetValueForProperty("Sku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Sku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSkuTypeConverter.ConvertFrom); + } + if (content.Contains("ExtendedLocation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocation = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation) content.GetValueForProperty("ExtendedLocation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocation, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ExtendedLocationTypeConverter.ConvertFrom); + } + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("Property")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("ExtendedLocationName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocationName = (string) content.GetValueForProperty("ExtendedLocationName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocationName, global::System.Convert.ToString); + } + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerStateTypeConverter.ConvertFrom); + } + if (content.Contains("SkuName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SkuName = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName?) content.GetValueForProperty("SkuName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SkuName, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName.CreateFrom); + } + if (content.Contains("SkuTier")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SkuTier = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier?) content.GetValueForProperty("SkuTier",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SkuTier, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier.CreateFrom); + } + if (content.Contains("ExtendedLocationType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocationType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes?) content.GetValueForProperty("ExtendedLocationType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ExtendedLocationType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes.CreateFrom); + } + if (content.Contains("IdentityPrincipalId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityPrincipalId = (string) content.GetValueForProperty("IdentityPrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityPrincipalId, global::System.Convert.ToString); + } + if (content.Contains("IdentityTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityTenantId = (string) content.GetValueForProperty("IdentityTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityTenantId, global::System.Convert.ToString); + } + if (content.Contains("IdentityType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType?) content.GetValueForProperty("IdentityType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType.CreateFrom); + } + if (content.Contains("IdentityUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("IdentityUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityUserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile) content.GetValueForProperty("LinuxProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceLinuxProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWindowsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ServicePrincipalProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile) content.GetValueForProperty("ServicePrincipalProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterServicePrincipalProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PodIdentityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile) content.GetValueForProperty("PodIdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterOidcIssuerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AadProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAadProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AutoUpgradeProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoUpgradeProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile) content.GetValueForProperty("AutoUpgradeProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoUpgradeProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAutoUpgradeProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AutoScalerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ApiServerAccessProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile) content.GetValueForProperty("ApiServerAccessProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterApiServerAccessProfileTypeConverter.ConvertFrom); + } + if (content.Contains("HttpProxyConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig) content.GetValueForProperty("HttpProxyConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterHttpProxyConfigTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadAutoScalerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadAutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile) content.GetValueForProperty("WorkloadAutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadAutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AzureMonitorProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureMonitorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile) content.GetValueForProperty("AzureMonitorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureMonitorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("MaxAgentPool")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MaxAgentPool = (int?) content.GetValueForProperty("MaxAgentPool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MaxAgentPool, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("CurrentKubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).CurrentKubernetesVersion = (string) content.GetValueForProperty("CurrentKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).CurrentKubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("DnsPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DnsPrefix, global::System.Convert.ToString); + } + if (content.Contains("FqdnSubdomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).FqdnSubdomain = (string) content.GetValueForProperty("FqdnSubdomain",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).FqdnSubdomain, global::System.Convert.ToString); + } + if (content.Contains("Fqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).Fqdn, global::System.Convert.ToString); + } + if (content.Contains("PrivateFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PrivateFqdn = (string) content.GetValueForProperty("PrivateFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PrivateFqdn, global::System.Convert.ToString); + } + if (content.Contains("AzurePortalFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzurePortalFqdn = (string) content.GetValueForProperty("AzurePortalFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzurePortalFqdn, global::System.Convert.ToString); + } + if (content.Contains("AgentPoolProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("AddonProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AddonProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles) content.GetValueForProperty("AddonProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AddonProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAddonProfilesTypeConverter.ConvertFrom); + } + if (content.Contains("NodeResourceGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).NodeResourceGroup = (string) content.GetValueForProperty("NodeResourceGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).NodeResourceGroup, global::System.Convert.ToString); + } + if (content.Contains("EnableRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnablePodSecurityPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("IdentityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile) content.GetValueForProperty("IdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).IdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesIdentityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[]) content.GetValueForProperty("PrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PrivateLinkResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DisableLocalAccount = (bool?) content.GetValueForProperty("DisableLocalAccount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DisableLocalAccount, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess.CreateFrom); + } + if (content.Contains("NetworkProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PowerStateCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + } + if (content.Contains("WindowProfileLicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileLicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileLicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); + } + if (content.Contains("AutoUpgradeProfileUpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoUpgradeProfileUpgradeChannel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel?) content.GetValueForProperty("AutoUpgradeProfileUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoUpgradeProfileUpgradeChannel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel.CreateFrom); + } + if (content.Contains("AutoScalerProfileExpander")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileExpander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileExpander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); + } + if (content.Contains("LinuxProfileSsh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxProfileAdminUsername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfileAdminUsername = (string) content.GetValueForProperty("LinuxProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).LinuxProfileAdminUsername, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileGmsaProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileGmsaProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile) content.GetValueForProperty("WindowProfileGmsaProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileGmsaProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowProfileAdminUsername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileAdminUsername = (string) content.GetValueForProperty("WindowProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileAdminUsername, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileAdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileAdminPassword = (string) content.GetValueForProperty("WindowProfileAdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileAdminPassword, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileEnableCsiProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileEnableCsiProxy = (bool?) content.GetValueForProperty("WindowProfileEnableCsiProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WindowProfileEnableCsiProxy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ServicePrincipalProfileClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfileClientId = (string) content.GetValueForProperty("ServicePrincipalProfileClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfileClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalProfileSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfileSecret = (string) content.GetValueForProperty("ServicePrincipalProfileSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ServicePrincipalProfileSecret, global::System.Convert.ToString); + } + if (content.Contains("PodIdentityProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileEnabled = (bool?) content.GetValueForProperty("PodIdentityProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PodIdentityProfileAllowNetworkPluginKubenet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileAllowNetworkPluginKubenet = (bool?) content.GetValueForProperty("PodIdentityProfileAllowNetworkPluginKubenet",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileAllowNetworkPluginKubenet, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PodIdentityProfileUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[]) content.GetValueForProperty("PodIdentityProfileUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileUserAssignedIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("PodIdentityProfileUserAssignedIdentityException")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileUserAssignedIdentityException = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[]) content.GetValueForProperty("PodIdentityProfileUserAssignedIdentityException",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).PodIdentityProfileUserAssignedIdentityException, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionTypeConverter.ConvertFrom)); + } + if (content.Contains("OidcIssuerProfileIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("OidcIssuerProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileManaged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileManaged = (bool?) content.GetValueForProperty("AadProfileManaged",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileManaged, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileEnableAzureRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileAdminGroupObjectID")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AadProfileClientAppId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileClientAppId, global::System.Convert.ToString); + } + if (content.Contains("AadProfileServerAppId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileServerAppId, global::System.Convert.ToString); + } + if (content.Contains("AadProfileServerAppSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileServerAppSecret = (string) content.GetValueForProperty("AadProfileServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileServerAppSecret, global::System.Convert.ToString); + } + if (content.Contains("AadProfileTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AadProfileTenantId, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxGracefulTerminationSec")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec = (string) content.GetValueForProperty("AutoScalerProfileMaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxGracefulTerminationSec, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxNodeProvisionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxNodeProvisionTime = (string) content.GetValueForProperty("AutoScalerProfileMaxNodeProvisionTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxNodeProvisionTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxTotalUnreadyPercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage = (string) content.GetValueForProperty("AutoScalerProfileMaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileNewPodScaleUpDelay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay = (string) content.GetValueForProperty("AutoScalerProfileNewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileNewPodScaleUpDelay, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileOkTotalUnreadyCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount = (string) content.GetValueForProperty("AutoScalerProfileOkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileOkTotalUnreadyCount, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScanInterval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScanInterval = (string) content.GetValueForProperty("AutoScalerProfileScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScanInterval, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterAdd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterAdd, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterDelete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterDelete, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterFailure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownDelayAfterFailure, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUnneededTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUnneededTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUnreadyTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUnreadyTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUtilizationThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileScaleDownUtilizationThreshold, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileSkipNodesWithLocalStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileSkipNodesWithLocalStorage, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileSkipNodesWithSystemPod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AutoScalerProfileSkipNodesWithSystemPod, global::System.Convert.ToString); + } + if (content.Contains("ApiServerAccessProfileAuthorizedIPRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange = (string[]) content.GetValueForProperty("ApiServerAccessProfileAuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileAuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ApiServerAccessProfileEnablePrivateCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfilePrivateDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfilePrivateDnsZone = (string) content.GetValueForProperty("ApiServerAccessProfilePrivateDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfilePrivateDnsZone, global::System.Convert.ToString); + } + if (content.Contains("ApiServerAccessProfileEnablePrivateClusterPublicFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateClusterPublicFqdn = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateClusterPublicFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileEnablePrivateClusterPublicFqdn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfileDisableRunCommand")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileDisableRunCommand = (bool?) content.GetValueForProperty("ApiServerAccessProfileDisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ApiServerAccessProfileDisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("HttpProxyConfigHttpProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigHttpProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigHttpProxy, global::System.Convert.ToString); + } + if (content.Contains("HttpProxyConfigHttpsProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigHttpsProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpsProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigHttpsProxy, global::System.Convert.ToString); + } + if (content.Contains("HttpProxyConfigNoProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigNoProxy = (string[]) content.GetValueForProperty("HttpProxyConfigNoProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigNoProxy, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("HttpProxyConfigTrustedCa")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigTrustedCa = (string) content.GetValueForProperty("HttpProxyConfigTrustedCa",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).HttpProxyConfigTrustedCa, global::System.Convert.ToString); + } + if (content.Contains("SecurityProfileDefender")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileDefender = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender) content.GetValueForProperty("SecurityProfileDefender",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileDefender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileAzureKeyVaultKm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileAzureKeyVaultKm = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms) content.GetValueForProperty("SecurityProfileAzureKeyVaultKm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileAzureKeyVaultKm, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKmsTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileWorkloadIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileImageCleaner")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("SecurityProfileImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityProfileImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); + } + if (content.Contains("AzureKeyVaultKmKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); + } + if (content.Contains("StorageProfileDiskCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileDiskCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver) content.GetValueForProperty("StorageProfileDiskCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileDiskCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileFileCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileFileCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver) content.GetValueForProperty("StorageProfileFileCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileFileCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileSnapshotController")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileSnapshotController = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController) content.GetValueForProperty("StorageProfileSnapshotController",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileSnapshotController, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotControllerTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileBlobCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileBlobCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver) content.GetValueForProperty("StorageProfileBlobCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).StorageProfileBlobCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadAutoScalerProfileKeda")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadAutoScalerProfileKeda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("WorkloadAutoScalerProfileKeda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadAutoScalerProfileKeda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); + } + if (content.Contains("AzureMonitorProfileMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureMonitorProfileMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics) content.GetValueForProperty("AzureMonitorProfileMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureMonitorProfileMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); + } + if (content.Contains("GmsaProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileEnabled = (bool?) content.GetValueForProperty("GmsaProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GmsaProfileDnsServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileDnsServer = (string) content.GetValueForProperty("GmsaProfileDnsServer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileDnsServer, global::System.Convert.ToString); + } + if (content.Contains("GmsaProfileRootDomainName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileRootDomainName = (string) content.GetValueForProperty("GmsaProfileRootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).GmsaProfileRootDomainName, global::System.Convert.ToString); + } + if (content.Contains("DefenderSecurityMonitoring")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DefenderSecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("DefenderSecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DefenderSecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); + } + if (content.Contains("DefenderLogAnalyticsWorkspaceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DefenderLogAnalyticsWorkspaceResourceId = (string) content.GetValueForProperty("DefenderLogAnalyticsWorkspaceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DefenderLogAnalyticsWorkspaceResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureKeyVaultKmEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmEnabled = (bool?) content.GetValueForProperty("AzureKeyVaultKmEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AzureKeyVaultKmKeyVaultNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes?) content.GetValueForProperty("AzureKeyVaultKmKeyVaultNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes.CreateFrom); + } + if (content.Contains("AzureKeyVaultKmKeyVaultResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyVaultResourceId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyVaultResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).AzureKeyVaultKmKeyVaultResourceId, global::System.Convert.ToString); + } + if (content.Contains("WorkloadIdentityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ImageCleanerEnabled = (bool?) content.GetValueForProperty("ImageCleanerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ImageCleanerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerIntervalHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ImageCleanerIntervalHour = (int?) content.GetValueForProperty("ImageCleanerIntervalHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).ImageCleanerIntervalHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DiskCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DiskCsiDriverEnabled = (bool?) content.GetValueForProperty("DiskCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).DiskCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("FileCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).FileCsiDriverEnabled = (bool?) content.GetValueForProperty("FileCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).FileCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SnapshotControllerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SnapshotControllerEnabled = (bool?) content.GetValueForProperty("SnapshotControllerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SnapshotControllerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BlobCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).BlobCsiDriverEnabled = (bool?) content.GetValueForProperty("BlobCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).BlobCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KedaEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KedaEnabled = (bool) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KedaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MetricKubeStateMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MetricKubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("MetricKubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MetricKubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("MetricEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MetricEnabled = (bool) content.GetValueForProperty("MetricEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).MetricEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).SecurityMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeStateMetricLabelsAllowlist")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); + } + if (content.Contains("KubeStateMetricAnnotationsAllowList")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal)this).KubeStateMetricAnnotationsAllowList, 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(); + } + /// Managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterTypeConverter))] + public partial interface IManagedCluster + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.TypeConverter.cs index baccf6e49c00..5f9ce1c9c731 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.cs new file mode 100644 index 000000000000..a480c2ace14e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.cs @@ -0,0 +1,2087 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Managed cluster. + public partial class ManagedCluster : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResource(); + + /// The list of AAD group object IDs that will have admin role of the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string[] AadProfileAdminGroupObjectID { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileAdminGroupObjectID; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileAdminGroupObjectID = value ?? null /* arrayOf */; } + + /// + /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AadProfileClientAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileClientAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileClientAppId = value ?? null; } + + /// Whether to enable Azure RBAC for Kubernetes authorization. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AadProfileEnableAzureRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileEnableAzureRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileEnableAzureRbac = value ?? default(bool); } + + /// Whether to enable managed AAD. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AadProfileManaged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileManaged; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileManaged = value ?? default(bool); } + + /// + /// (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AadProfileServerAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileServerAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileServerAppId = value ?? null; } + + /// + /// (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AadProfileServerAppSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileServerAppSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileServerAppSecret = value ?? null; } + + /// + /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileTenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfileTenantId = value ?? null; } + + /// The profile of managed cluster add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles AddonProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AddonProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AddonProfile = value ?? null /* model class */; } + + /// The agent pool properties. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AgentPoolProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string[] ApiServerAccessProfileAuthorizedIPRange { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileAuthorizedIPRange; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileAuthorizedIPRange = value ?? null /* arrayOf */; } + + /// Whether to disable run command for the cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? ApiServerAccessProfileDisableRunCommand { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileDisableRunCommand; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileDisableRunCommand = value ?? default(bool); } + + /// + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnablePrivateCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnablePrivateCluster = value ?? default(bool); } + + /// Whether to create additional public FQDN for private cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? ApiServerAccessProfileEnablePrivateClusterPublicFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfileEnablePrivateClusterPublicFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfilePrivateDnsZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfilePrivateDnsZone = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileBalanceSimilarNodeGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileExpander; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileExpander = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander)""); } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxEmptyBulkDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxEmptyBulkDelete = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxGracefulTerminationSec; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileMaxNodeProvisionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxNodeProvisionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxNodeProvisionTime = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileMaxTotalUnreadyPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileNewPodScaleUpDelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileNewPodScaleUpDelay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileNewPodScaleUpDelay = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileOkTotalUnreadyCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileScaleDownDelayAfterAdd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterAdd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileScaleDownDelayAfterDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileScaleDownDelayAfterFailure { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownDelayAfterFailure; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileScaleDownUnneededTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnneededTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileScaleDownUnreadyTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnreadyTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUnreadyTime = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUtilizationThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScaleDownUtilizationThreshold = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScanInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileScanInterval = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithLocalStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithLocalStorage = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfileSkipNodesWithSystemPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel? AutoUpgradeProfileUpgradeChannel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfileUpgradeChannel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfileUpgradeChannel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel)""); } + + /// Whether to enable Azure Key Vault key management service. The default is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AzureKeyVaultKmEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmEnabled = value ?? default(bool); } + + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AzureKeyVaultKmKeyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmKeyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? AzureKeyVaultKmKeyVaultNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmKeyVaultNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmKeyVaultNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes)""); } + + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AzureKeyVaultKmKeyVaultResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzureKeyVaultKmKeyVaultResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AzurePortalFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzurePortalFqdn; } + + /// Whether to enable AzureBlob CSI Driver. The default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? BlobCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).BlobCsiDriverEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).BlobCsiDriverEnabled = value ?? default(bool); } + + /// + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).CurrentKubernetesVersion; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string DefenderLogAnalyticsWorkspaceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).DefenderLogAnalyticsWorkspaceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? DisableLocalAccount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).DisableLocalAccount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).DisableLocalAccount = value ?? default(bool); } + + /// Whether to enable AzureDisk CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? DiskCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).DiskCsiDriverEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).DiskCsiDriverEnabled = value ?? default(bool); } + + /// + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).DiskEncryptionSetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).DiskEncryptionSetId = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).DnsPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).DnsPrefix = value ?? null; } + + /// + /// (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.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? EnablePodSecurityPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).EnablePodSecurityPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).EnablePodSecurityPolicy = value ?? default(bool); } + + /// Whether to enable Kubernetes Role-Based Access Control. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? EnableRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).EnableRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).EnableRbac = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation _extendedLocation; + + /// The extended location of the Virtual Machine. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation ExtendedLocation { get => (this._extendedLocation = this._extendedLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ExtendedLocation()); set => this._extendedLocation = value; } + + /// The name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ExtendedLocationName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal)ExtendedLocation).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal)ExtendedLocation).Name = value ?? null; } + + /// The type of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes? ExtendedLocationType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal)ExtendedLocation).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocationInternal)ExtendedLocation).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes)""); } + + /// Whether to enable AzureFile CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? FileCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).FileCsiDriverEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).FileCsiDriverEnabled = value ?? default(bool); } + + /// The FQDN of the master pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string Fqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).Fqdn; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).FqdnSubdomain; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).FqdnSubdomain = value ?? null; } + + /// + /// 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string GmsaProfileDnsServer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).GmsaProfileDnsServer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).GmsaProfileDnsServer = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).GmsaProfileEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).GmsaProfileEnabled = value ?? default(bool); } + + /// + /// Specifies the root domain name 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string GmsaProfileRootDomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).GmsaProfileRootDomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).GmsaProfileRootDomainName = value ?? null; } + + /// The HTTP proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string HttpProxyConfigHttpProxy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).HttpProxyConfigHttpProxy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).HttpProxyConfigHttpProxy = value ?? null; } + + /// The HTTPS proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string HttpProxyConfigHttpsProxy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).HttpProxyConfigHttpsProxy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).HttpProxyConfigHttpsProxy = value ?? null; } + + /// The endpoints that should not go through proxy. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string[] HttpProxyConfigNoProxy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).HttpProxyConfigNoProxy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).HttpProxyConfigNoProxy = value ?? null /* arrayOf */; } + + /// Alternative CA cert to use for connecting to proxy servers. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string HttpProxyConfigTrustedCa { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).HttpProxyConfigTrustedCa; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).HttpProxyConfigTrustedCa = value ?? null; } + + /// + /// Fully qualified resource ID for the resource. Ex - /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.Api30.IResourceInternal)__trackedResource).Id; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity _identity; + + /// The identity of the managed cluster, if configured. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentity()); set => this._identity = value; } + + /// + /// 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.Api20230201.IManagedClusterIdentityInternal)Identity).PrincipalId; } + + /// Identities associated with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile IdentityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).IdentityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).IdentityProfile = value ?? null /* model class */; } + + /// + /// The tenant 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 IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)Identity).TenantId; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? IdentityType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)Identity).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)Identity).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType)""); } + + /// + /// 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.Api20230201.IManagedClusterIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)Identity).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)Identity).UserAssignedIdentity = value ?? null /* model class */; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).ImageCleanerEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ImageCleanerEnabled = value ?? default(bool); } + + /// Image Cleaner scanning interval in hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? ImageCleanerIntervalHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ImageCleanerIntervalHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ImageCleanerIntervalHour = value ?? default(int); } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).KedaEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).KedaEnabled = value ?? default(bool); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeStateMetricAnnotationsAllowList { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).KubeStateMetricAnnotationsAllowList; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).KubeStateMetricAnnotationsAllowList = value ?? null; } + + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeStateMetricLabelsAllowlist { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).KubeStateMetricLabelsAllowlist; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).KubernetesVersion = value ?? null; } + + /// The administrator username to use for Linux VMs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string LinuxProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).LinuxProfileAdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).LinuxProfileAdminUsername = value ?? null; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// The max number of agent pools for the managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? MaxAgentPool { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).MaxAgentPool; } + + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? MetricEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).MetricEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).MetricEnabled = value ?? default(bool); } + + /// Internal Acessors for AadProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.AadProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AadProfile = value; } + + /// Internal Acessors for ApiServerAccessProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.ApiServerAccessProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ApiServerAccessProfile = value; } + + /// Internal Acessors for AutoScalerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.AutoScalerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoScalerProfile = value; } + + /// Internal Acessors for AutoUpgradeProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.AutoUpgradeProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AutoUpgradeProfile = value; } + + /// Internal Acessors for AzureMonitorProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.AzureMonitorProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzureMonitorProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzureMonitorProfile = value; } + + /// Internal Acessors for AzureMonitorProfileMetric + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.AzureMonitorProfileMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzureMonitorProfileMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzureMonitorProfileMetric = value; } + + /// Internal Acessors for AzurePortalFqdn + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.AzurePortalFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzurePortalFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).AzurePortalFqdn = value; } + + /// Internal Acessors for CurrentKubernetesVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.CurrentKubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).CurrentKubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).CurrentKubernetesVersion = value; } + + /// Internal Acessors for DefenderSecurityMonitoring + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.DefenderSecurityMonitoring { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).DefenderSecurityMonitoring; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).DefenderSecurityMonitoring = value; } + + /// Internal Acessors for ExtendedLocation + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.ExtendedLocation { get => (this._extendedLocation = this._extendedLocation ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ExtendedLocation()); set { {_extendedLocation = value;} } } + + /// Internal Acessors for Fqdn + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.Fqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).Fqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).Fqdn = value; } + + /// Internal Acessors for HttpProxyConfig + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.HttpProxyConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).HttpProxyConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).HttpProxyConfig = value; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for IdentityPrincipalId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.IdentityPrincipalId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)Identity).PrincipalId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)Identity).PrincipalId = value; } + + /// Internal Acessors for IdentityTenantId + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.IdentityTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)Identity).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)Identity).TenantId = value; } + + /// Internal Acessors for LinuxProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.LinuxProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).LinuxProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).LinuxProfile = value; } + + /// Internal Acessors for LinuxProfileSsh + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.LinuxProfileSsh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).LinuxProfileSsh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).LinuxProfileSsh = value; } + + /// Internal Acessors for MaxAgentPool + int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.MaxAgentPool { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).MaxAgentPool; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).MaxAgentPool = value; } + + /// Internal Acessors for MetricKubeStateMetric + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.MetricKubeStateMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).MetricKubeStateMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).MetricKubeStateMetric = value; } + + /// Internal Acessors for OidcIssuerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.OidcIssuerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).OidcIssuerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).OidcIssuerProfile = value; } + + /// Internal Acessors for OidcIssuerProfileIssuerUrl + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileIssuerUrl = value; } + + /// Internal Acessors for PodIdentityProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.PodIdentityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PodIdentityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PodIdentityProfile = value; } + + /// Internal Acessors for PowerState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PowerState = value; } + + /// Internal Acessors for PrivateFqdn + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.PrivateFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PrivateFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PrivateFqdn = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for SecurityProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.SecurityProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityProfile = value; } + + /// Internal Acessors for SecurityProfileAzureKeyVaultKm + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.SecurityProfileAzureKeyVaultKm { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityProfileAzureKeyVaultKm; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityProfileAzureKeyVaultKm = value; } + + /// Internal Acessors for SecurityProfileDefender + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.SecurityProfileDefender { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityProfileDefender; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityProfileDefender = value; } + + /// Internal Acessors for SecurityProfileImageCleaner + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.SecurityProfileImageCleaner { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityProfileImageCleaner; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityProfileImageCleaner = value; } + + /// Internal Acessors for SecurityProfileWorkloadIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.SecurityProfileWorkloadIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityProfileWorkloadIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityProfileWorkloadIdentity = value; } + + /// Internal Acessors for ServicePrincipalProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.ServicePrincipalProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfile = value; } + + /// Internal Acessors for Sku + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSku()); set { {_sku = value;} } } + + /// Internal Acessors for StorageProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.StorageProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).StorageProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).StorageProfile = value; } + + /// Internal Acessors for StorageProfileBlobCsiDriver + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.StorageProfileBlobCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).StorageProfileBlobCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).StorageProfileBlobCsiDriver = value; } + + /// Internal Acessors for StorageProfileDiskCsiDriver + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.StorageProfileDiskCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).StorageProfileDiskCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).StorageProfileDiskCsiDriver = value; } + + /// Internal Acessors for StorageProfileFileCsiDriver + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.StorageProfileFileCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).StorageProfileFileCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).StorageProfileFileCsiDriver = value; } + + /// Internal Acessors for StorageProfileSnapshotController + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.StorageProfileSnapshotController { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).StorageProfileSnapshotController; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).StorageProfileSnapshotController = value; } + + /// Internal Acessors for WindowProfileGmsaProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.WindowProfileGmsaProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowProfileGmsaProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowProfileGmsaProfile = value; } + + /// Internal Acessors for WindowsProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.WindowsProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowsProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowsProfile = value; } + + /// Internal Acessors for WorkloadAutoScalerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.WorkloadAutoScalerProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfile = value; } + + /// Internal Acessors for WorkloadAutoScalerProfileKeda + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterInternal.WorkloadAutoScalerProfileKeda { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfileKeda; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WorkloadAutoScalerProfileKeda = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Type = value; } + + /// 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.Api30.IResourceInternal)__trackedResource).Name; } + + /// The network configuration profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile NetworkProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).NetworkProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).NetworkProfile = value ?? null /* model class */; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).NodeResourceGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).NodeResourceGroup = 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.Api20230201.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).OidcIssuerProfileEnabled = value ?? default(bool); } + + /// The OIDC issuer url of the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? PodIdentityProfileAllowNetworkPluginKubenet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PodIdentityProfileAllowNetworkPluginKubenet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PodIdentityProfileAllowNetworkPluginKubenet = value ?? default(bool); } + + /// Whether the pod identity addon is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? PodIdentityProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PodIdentityProfileEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PodIdentityProfileEnabled = value ?? default(bool); } + + /// The pod identities to use in the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[] PodIdentityProfileUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PodIdentityProfileUserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PodIdentityProfileUserAssignedIdentity = value ?? null /* arrayOf */; } + + /// The pod identity exceptions to allow. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[] PodIdentityProfileUserAssignedIdentityException { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PodIdentityProfileUserAssignedIdentityException; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PodIdentityProfileUserAssignedIdentityException = value ?? null /* arrayOf */; } + + /// Tells whether the cluster is Running or Stopped + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PowerStateCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PowerStateCode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } + + /// The FQDN of private cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string PrivateFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PrivateFqdn; } + + /// Private link resources associated with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] PrivateLinkResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PrivateLinkResource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PrivateLinkResource = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties _property; + + /// Properties of a managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterProperties()); set => this._property = value; } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).ProvisioningState; } + + /// Allow or deny public network access for AKS + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess? PublicNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PublicNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).PublicNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess)""); } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SecurityMonitoringEnabled = value ?? default(bool); } + + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfileClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfileClientId = value ?? null; } + + /// The secret password associated with the service principal in plain text. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ServicePrincipalProfileSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfileSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).ServicePrincipalProfileSecret = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku _sku; + + /// The managed cluster SKU. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku Sku { get => (this._sku = this._sku ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSku()); set => this._sku = value; } + + /// The name of a managed cluster SKU. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName? SkuName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)Sku).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)Sku).Name = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName)""); } + + /// + /// 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)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier? SkuTier { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)Sku).Tier; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)Sku).Tier = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier)""); } + + /// Whether to enable Snapshot Controller. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? SnapshotControllerEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SnapshotControllerEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SnapshotControllerEnabled = value ?? default(bool); } + + /// + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).SshPublicKey = value ?? null /* arrayOf */; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemData; } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// 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.Api30.IResourceInternal)__trackedResource).Type; } + + /// + /// 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:** + /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string WindowProfileAdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowProfileAdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowProfileAdminPassword = value ?? null; } + + /// + /// Specifies the name of the administrator account.

**Restriction:** Cannot end in "."

**Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string WindowProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowProfileAdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowProfileAdminUsername = value ?? null; } + + /// + /// 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.Api20230201.IManagedClusterPropertiesInternal)Property).WindowProfileEnableCsiProxy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowProfileEnableCsiProxy = value ?? default(bool); } + + /// + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowProfileLicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WindowProfileLicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType)""); } + + /// Whether to enable workload identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? WorkloadIdentityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WorkloadIdentityEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)Property).WorkloadIdentityEnabled = value ?? default(bool); } + + /// Creates an new instance. + public ManagedCluster() + { + + } + + /// 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(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// Managed cluster. + public partial interface IManagedCluster : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResource + { + /// The list of AAD group object IDs that will have admin role of the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of AAD group object IDs that will have admin role of the cluster.", + SerializedName = @"adminGroupObjectIDs", + PossibleTypes = new [] { typeof(string) })] + string[] AadProfileAdminGroupObjectID { get; set; } + /// + /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"(DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy.", + SerializedName = @"clientAppID", + PossibleTypes = new [] { typeof(string) })] + string AadProfileClientAppId { get; set; } + /// Whether to enable Azure RBAC for Kubernetes authorization. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Azure RBAC for Kubernetes authorization.", + SerializedName = @"enableAzureRBAC", + PossibleTypes = new [] { typeof(bool) })] + bool? AadProfileEnableAzureRbac { get; set; } + /// Whether to enable managed AAD. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable managed AAD.", + SerializedName = @"managed", + PossibleTypes = new [] { typeof(bool) })] + bool? AadProfileManaged { get; set; } + /// + /// (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"(DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy.", + SerializedName = @"serverAppID", + PossibleTypes = new [] { typeof(string) })] + string AadProfileServerAppId { get; set; } + /// + /// (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"(DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy.", + SerializedName = @"serverAppSecret", + PossibleTypes = new [] { typeof(string) })] + string AadProfileServerAppSecret { get; set; } + /// + /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.", + SerializedName = @"tenantID", + PossibleTypes = new [] { typeof(string) })] + string AadProfileTenantId { get; set; } + /// The profile of managed cluster add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The profile of managed cluster add-on.", + SerializedName = @"addonProfiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles AddonProfile { get; set; } + /// The agent pool properties. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The agent pool properties.", + SerializedName = @"agentPoolProfiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[] 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"authorizedIPRanges", + PossibleTypes = new [] { typeof(string) })] + string[] ApiServerAccessProfileAuthorizedIPRange { get; set; } + /// Whether to disable run command for the cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to disable run command for the cluster or not.", + SerializedName = @"disableRunCommand", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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; } + /// Whether to create additional public FQDN for private cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to create additional public FQDN for private cluster or not.", + SerializedName = @"enablePrivateClusterPublicFQDN", + 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). + /// Allowed values are 'system' and 'none'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + SerializedName = @"privateDNSZone", + PossibleTypes = new [] { typeof(string) })] + string ApiServerAccessProfilePrivateDnsZone { get; set; } + /// Valid values are 'true' and 'false' + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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) + /// for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get; set; } + /// The default is 10. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default is 10.", + SerializedName = @"max-empty-bulk-delete", + PossibleTypes = new [] { typeof(string) })] + string AutoScalerProfileMaxEmptyBulkDelete { get; set; } + /// The default is 600. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + PossibleTypes = new [] { typeof(string) })] + string AutoScalerProfileMaxNodeProvisionTime { get; set; } + /// The default is 45. The maximum is 100 and the minimum is 0. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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; } + /// + /// 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, + 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).", + SerializedName = @"new-pod-scale-up-delay", + PossibleTypes = new [] { typeof(string) })] + string AutoScalerProfileNewPodScaleUpDelay { get; set; } + /// This must be an integer. The default is 3. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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( + Required = false, + ReadOnly = false, + Description = @"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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel? AutoUpgradeProfileUpgradeChannel { get; set; } + /// Whether to enable Azure Key Vault key management service. The default is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Azure Key Vault key management service. The default is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? AzureKeyVaultKmEnabled { get; set; } + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty.", + SerializedName = @"keyId", + 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`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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`.", + SerializedName = @"keyVaultNetworkAccess", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? AzureKeyVaultKmKeyVaultNetworkAccess { get; set; } + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty.", + SerializedName = @"keyVaultResourceId", + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + 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.", + SerializedName = @"azurePortalFQDN", + PossibleTypes = new [] { typeof(string) })] + string AzurePortalFqdn { get; } + /// Whether to enable AzureBlob CSI Driver. The default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureBlob CSI Driver. The default value is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? BlobCsiDriverEnabled { 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + 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.", + SerializedName = @"currentKubernetesVersion", + PossibleTypes = new [] { typeof(string) })] + string CurrentKubernetesVersion { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"logAnalyticsWorkspaceResourceId", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"disableLocalAccounts", + PossibleTypes = new [] { typeof(bool) })] + bool? DisableLocalAccount { get; set; } + /// Whether to enable AzureDisk CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureDisk CSI Driver. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DiskCsiDriverEnabled { get; set; } + /// + /// This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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, + 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, + ReadOnly = false, + Description = @"Whether to enable Kubernetes Role-Based Access Control.", + SerializedName = @"enableRBAC", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableRbac { get; set; } + /// The name of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the extended location.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string ExtendedLocationName { get; set; } + /// The type of the extended location. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of the extended location.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes? ExtendedLocationType { get; set; } + /// Whether to enable AzureFile CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureFile CSI Driver. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? FileCsiDriverEnabled { get; set; } + /// The FQDN of the master pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The FQDN of the master pool.", + SerializedName = @"fqdn", + PossibleTypes = new [] { typeof(string) })] + string Fqdn { get; } + /// This cannot be updated once the Managed Cluster has been created. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This cannot be updated once the Managed Cluster has been created.", + SerializedName = @"fqdnSubdomain", + PossibleTypes = new [] { typeof(string) })] + 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"dnsServer", + PossibleTypes = new [] { typeof(string) })] + string GmsaProfileDnsServer { get; set; } + /// Specifies whether to enable Windows gMSA in the managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether to enable Windows gMSA in the managed cluster.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + 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 + /// vnet which is used to create the managed cluster. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the root domain name 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.", + SerializedName = @"rootDomainName", + PossibleTypes = new [] { typeof(string) })] + string GmsaProfileRootDomainName { get; set; } + /// The HTTP proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The HTTP proxy server endpoint to use.", + SerializedName = @"httpProxy", + PossibleTypes = new [] { typeof(string) })] + string HttpProxyConfigHttpProxy { get; set; } + /// The HTTPS proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The HTTPS proxy server endpoint to use.", + SerializedName = @"httpsProxy", + PossibleTypes = new [] { typeof(string) })] + string HttpProxyConfigHttpsProxy { get; set; } + /// The endpoints that should not go through proxy. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The endpoints that should not go through proxy.", + SerializedName = @"noProxy", + PossibleTypes = new [] { typeof(string) })] + string[] HttpProxyConfigNoProxy { get; set; } + /// Alternative CA cert to use for connecting to proxy servers. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Alternative CA cert to use for connecting to proxy servers.", + SerializedName = @"trustedCa", + PossibleTypes = new [] { typeof(string) })] + string HttpProxyConfigTrustedCa { get; set; } + /// + /// The principal id of the system assigned identity which is used by master components. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The principal id of the system assigned identity which is used by master components.", + SerializedName = @"principalId", + PossibleTypes = new [] { typeof(string) })] + string IdentityPrincipalId { get; } + /// Identities associated with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identities associated with the cluster.", + SerializedName = @"identityProfile", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } + /// + /// The tenant id of the system assigned identity which is used by master components. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The tenant id of the system assigned identity which is used by master components.", + SerializedName = @"tenantId", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity).", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? IdentityType { get; set; } + /// + /// 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, + ReadOnly = false, + Description = @"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.Api20230201.IManagedClusterIdentityUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities IdentityUserAssignedIdentity { get; set; } + /// Whether to enable Image Cleaner on AKS cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Image Cleaner on AKS cluster.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? ImageCleanerEnabled { get; set; } + /// Image Cleaner scanning interval in hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image Cleaner scanning interval in hours.", + SerializedName = @"intervalHours", + PossibleTypes = new [] { typeof(int) })] + int? ImageCleanerIntervalHour { get; set; } + /// Whether to enable KEDA. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable KEDA.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? KedaEnabled { 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"metricAnnotationsAllowList", + PossibleTypes = new [] { typeof(string) })] + string KubeStateMetricAnnotationsAllowList { get; set; } + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only resource name and namespace labels.", + SerializedName = @"metricLabelsAllowlist", + 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) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"kubernetesVersion", + PossibleTypes = new [] { typeof(string) })] + string KubernetesVersion { get; set; } + /// The administrator username to use for Linux VMs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The administrator username to use for Linux VMs.", + SerializedName = @"adminUsername", + PossibleTypes = new [] { typeof(string) })] + string LinuxProfileAdminUsername { get; set; } + /// The max number of agent pools for the managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The max number of agent pools for the managed cluster.", + SerializedName = @"maxAgentPools", + PossibleTypes = new [] { typeof(int) })] + int? MaxAgentPool { get; } + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MetricEnabled { get; set; } + /// The network configuration profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The network configuration profile.", + SerializedName = @"networkProfile", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile NetworkProfile { get; set; } + /// The name of the resource group containing agent pool nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the resource group containing agent pool nodes.", + SerializedName = @"nodeResourceGroup", + PossibleTypes = new [] { typeof(string) })] + string NodeResourceGroup { get; set; } + /// Whether the OIDC issuer is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the OIDC issuer is enabled.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? OidcIssuerProfileEnabled { get; set; } + /// The OIDC issuer url of the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OIDC issuer url of the Managed Cluster.", + SerializedName = @"issuerURL", + 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) + /// for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"allowNetworkPluginKubenet", + PossibleTypes = new [] { typeof(bool) })] + bool? PodIdentityProfileAllowNetworkPluginKubenet { get; set; } + /// Whether the pod identity addon is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the pod identity addon is enabled.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? PodIdentityProfileEnabled { get; set; } + /// The pod identities to use in the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The pod identities to use in the cluster.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[] PodIdentityProfileUserAssignedIdentity { get; set; } + /// The pod identity exceptions to allow. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The pod identity exceptions to allow.", + SerializedName = @"userAssignedIdentityExceptions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[] PodIdentityProfileUserAssignedIdentityException { get; set; } + /// Tells whether the cluster is Running or Stopped + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tells whether the cluster is Running or Stopped", + SerializedName = @"code", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } + /// The FQDN of private cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The FQDN of private cluster.", + SerializedName = @"privateFQDN", + PossibleTypes = new [] { typeof(string) })] + string PrivateFqdn { get; } + /// Private link resources associated with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Private link resources associated with the cluster.", + SerializedName = @"privateLinkResources", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] PrivateLinkResource { get; set; } + /// The current provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Allow or deny public network access for AKS + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Allow or deny public network access for AKS", + SerializedName = @"publicNetworkAccess", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + /// Whether to enable Defender threat detection + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Defender threat detection", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityMonitoringEnabled { get; set; } + /// The ID for the service principal. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ID for the service principal.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string ServicePrincipalProfileClientId { get; set; } + /// The secret password associated with the service principal in plain text. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The secret password associated with the service principal in plain text.", + SerializedName = @"secret", + PossibleTypes = new [] { typeof(string) })] + string ServicePrincipalProfileSecret { get; set; } + /// The name of a managed cluster SKU. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of a managed cluster SKU.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName? SkuName { get; set; } + /// + /// 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( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"tier", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier? SkuTier { get; set; } + /// Whether to enable Snapshot Controller. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Snapshot Controller. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? SnapshotControllerEnabled { get; set; } + /// + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified.", + SerializedName = @"publicKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] SshPublicKey { 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:** + /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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:** ""abc@123"", ""P@$$w0rd"", ""P@ssw0rd"", ""P@ssword123"", ""Pa$$word"", ""pass@word1"", ""Password!"", ""Password1"", ""Password22"", ""iloveyou!""", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(string) })] + string WindowProfileAdminPassword { get; set; } + /// + /// Specifies the name of the administrator account.

**Restriction:** Cannot end in "."

**Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the name of the administrator account.

**Restriction:** Cannot end in "".""

**Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

**Minimum-length:** 1 character

**Max-length:** 20 characters", + SerializedName = @"adminUsername", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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; } + /// + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details.", + SerializedName = @"licenseType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get; set; } + /// Whether to enable workload identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable workload identity.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? WorkloadIdentityEnabled { get; set; } + + } + /// Managed cluster. + internal partial interface IManagedClusterInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal + { + /// The Azure Active Directory configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile AadProfile { get; set; } + /// The list of AAD group object IDs that will have admin role of the cluster. + string[] AadProfileAdminGroupObjectID { get; set; } + /// + /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + string AadProfileClientAppId { get; set; } + /// Whether to enable Azure RBAC for Kubernetes authorization. + bool? AadProfileEnableAzureRbac { get; set; } + /// Whether to enable managed AAD. + bool? AadProfileManaged { get; set; } + /// + /// (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + string AadProfileServerAppId { get; set; } + /// + /// (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + /// + string AadProfileServerAppSecret { get; set; } + /// + /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. + /// + string AadProfileTenantId { get; set; } + /// The profile of managed cluster add-on. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles AddonProfile { get; set; } + /// The agent pool properties. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get; set; } + /// The access profile for managed cluster API server. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + string[] 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). + /// + 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). + /// Allowed values are 'system' and 'none'. + /// + string ApiServerAccessProfilePrivateDnsZone { get; set; } + /// Parameters to be applied to the cluster-autoscaler when enabled + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get; set; } + /// 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) + /// for more information. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get; set; } + /// The default is 10. + string AutoScalerProfileMaxEmptyBulkDelete { get; set; } + /// 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. + /// + string AutoScalerProfileMaxNodeProvisionTime { get; set; } + /// 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). + /// + string AutoScalerProfileNewPodScaleUpDelay { get; set; } + /// 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. + /// + 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. + /// + 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. + /// + 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. + /// + 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. + /// + string AutoScalerProfileScaleDownUnreadyTime { get; set; } + /// The default is '0.5'. + string AutoScalerProfileScaleDownUtilizationThreshold { get; set; } + /// The default is '10'. Values must be an integer number of seconds. + string AutoScalerProfileScanInterval { get; set; } + /// The default is true. + string AutoScalerProfileSkipNodesWithLocalStorage { get; set; } + /// The default is true. + string AutoScalerProfileSkipNodesWithSystemPod { get; set; } + /// The auto upgrade configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel? AutoUpgradeProfileUpgradeChannel { get; set; } + /// Whether to enable Azure Key Vault key management service. The default is false. + bool? AzureKeyVaultKmEnabled { get; set; } + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + 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`. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? AzureKeyVaultKmKeyVaultNetworkAccess { get; set; } + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + string AzureKeyVaultKmKeyVaultResourceId { get; set; } + /// Azure Monitor addon profiles for monitoring the managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile AzureMonitorProfile { get; set; } + /// + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + /// metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus + /// for an overview. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + string AzurePortalFqdn { get; set; } + /// Whether to enable AzureBlob CSI Driver. The default value is false. + bool? BlobCsiDriverEnabled { 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. + /// + string CurrentKubernetesVersion { 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. + /// + string DefenderLogAnalyticsWorkspaceResourceId { get; set; } + /// + /// Microsoft Defender threat detection for Cloud settings for the security profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + 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}' + /// + 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. + /// + bool? EnablePodSecurityPolicy { get; set; } + /// Whether to enable Kubernetes Role-Based Access Control. + bool? EnableRbac { get; set; } + /// The extended location of the Virtual Machine. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IExtendedLocation ExtendedLocation { get; set; } + /// The name of the extended location. + string ExtendedLocationName { get; set; } + /// The type of the extended location. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes? ExtendedLocationType { 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. + 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. + 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 + /// vnet which is used to create the managed cluster. + ///
+ string GmsaProfileRootDomainName { get; set; } + /// Configurations for provisioning the cluster with HTTP proxy servers. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig HttpProxyConfig { get; set; } + /// The HTTP proxy server endpoint to use. + string HttpProxyConfigHttpProxy { get; set; } + /// The HTTPS proxy server endpoint to use. + string HttpProxyConfigHttpsProxy { get; set; } + /// The endpoints that should not go through proxy. + string[] HttpProxyConfigNoProxy { get; set; } + /// Alternative CA cert to use for connecting to proxy servers. + string HttpProxyConfigTrustedCa { get; set; } + /// The identity of the managed cluster, if configured. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity Identity { 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. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile IdentityProfile { 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). + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? IdentityType { get; set; } + /// + /// 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.Api20230201.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; } + /// Whether to enable KEDA. + bool? KedaEnabled { 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. + /// + string KubeStateMetricAnnotationsAllowList { get; set; } + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + 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) + /// for more details. + /// + string KubernetesVersion { get; set; } + /// The profile for Linux VMs in the Managed Cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile LinuxProfile { get; set; } + /// The administrator username to use for Linux VMs. + string LinuxProfileAdminUsername { get; set; } + /// The SSH configuration for Linux-based VMs running on Azure. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration LinuxProfileSsh { get; set; } + /// The max number of agent pools for the managed cluster. + int? MaxAgentPool { get; set; } + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + bool? MetricEnabled { get; set; } + /// + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics MetricKubeStateMetric { get; set; } + /// The network configuration profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile NetworkProfile { get; set; } + /// The name of the resource group containing agent pool nodes. + string NodeResourceGroup { get; set; } + /// The OIDC issuer profile of the Managed Cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile OidcIssuerProfile { get; set; } + /// Whether the OIDC issuer is enabled. + bool? OidcIssuerProfileEnabled { get; set; } + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// for more information. + /// + bool? PodIdentityProfileAllowNetworkPluginKubenet { get; set; } + /// Whether the pod identity addon is enabled. + bool? PodIdentityProfileEnabled { get; set; } + /// The pod identities to use in the cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[] PodIdentityProfileUserAssignedIdentity { get; set; } + /// The pod identity exceptions to allow. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[] PodIdentityProfileUserAssignedIdentityException { get; set; } + /// The Power State of the cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState PowerState { get; set; } + /// Tells whether the cluster is Running or Stopped + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } + /// The FQDN of private cluster. + string PrivateFqdn { get; set; } + /// Private link resources associated with the cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] PrivateLinkResource { get; set; } + /// Properties of a managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties Property { get; set; } + /// The current provisioning state. + string ProvisioningState { get; set; } + /// Allow or deny public network access for AKS + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + /// Whether to enable Defender threat detection + bool? SecurityMonitoringEnabled { get; set; } + /// Security profile for the managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile SecurityProfile { get; set; } + /// + /// Azure Key Vault [key management service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for + /// the security profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms SecurityProfileAzureKeyVaultKm { get; set; } + /// Microsoft Defender settings for the security profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender SecurityProfileDefender { get; set; } + /// Image Cleaner settings for the security profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner SecurityProfileImageCleaner { get; set; } + /// + /// Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access Azure + /// cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity SecurityProfileWorkloadIdentity { get; set; } + /// + /// Information about a service principal identity for the cluster to use for manipulating Azure APIs. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile ServicePrincipalProfile { get; set; } + /// The ID for the service principal. + string ServicePrincipalProfileClientId { get; set; } + /// The secret password associated with the service principal in plain text. + string ServicePrincipalProfileSecret { get; set; } + /// The managed cluster SKU. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku Sku { get; set; } + /// The name of a managed cluster SKU. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName? SkuName { get; set; } + /// + /// 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.Support.ManagedClusterSkuTier? SkuTier { get; set; } + /// Whether to enable Snapshot Controller. The default value is true. + bool? SnapshotControllerEnabled { get; set; } + /// + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] SshPublicKey { get; set; } + /// Storage profile for the managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile StorageProfile { get; set; } + /// AzureBlob CSI Driver settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver StorageProfileBlobCsiDriver { get; set; } + /// AzureDisk CSI Driver settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver StorageProfileDiskCsiDriver { get; set; } + /// AzureFile CSI Driver settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver StorageProfileFileCsiDriver { get; set; } + /// Snapshot Controller settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController StorageProfileSnapshotController { 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:** + /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + ///
+ string WindowProfileAdminPassword { get; set; } + /// + /// Specifies the name of the administrator account.

**Restriction:** Cannot end in "."

**Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters + ///
+ string WindowProfileAdminUsername { get; set; } + /// + /// 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. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile WindowProfileGmsaProfile { get; set; } + /// + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get; set; } + /// The profile for Windows VMs in the Managed Cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile WindowsProfile { get; set; } + /// Workload Auto-scaler profile for the managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile WorkloadAutoScalerProfile { get; set; } + /// + /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda WorkloadAutoScalerProfileKeda { get; set; } + /// Whether to enable workload identity. + bool? WorkloadIdentityEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.json.cs similarity index 76% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.json.cs index 5b5b411306a6..077c71c336d6 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedCluster.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedCluster.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedCluster 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.Api20200901.IManagedCluster. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedCluster(json) : null; } @@ -77,9 +77,11 @@ internal ManagedCluster(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.Json { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.Resource(json); - __baseManagedCluster = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.BaseManagedCluster(json); - {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterSku.FromJson(__jsonSku) : Sku;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResource(json); + {_sku = If( json?.PropertyT("sku"), out var __jsonSku) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSku.FromJson(__jsonSku) : Sku;} + {_extendedLocation = If( json?.PropertyT("extendedLocation"), out var __jsonExtendedLocation) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ExtendedLocation.FromJson(__jsonExtendedLocation) : ExtendedLocation;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentity.FromJson(__jsonIdentity) : Identity;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } @@ -102,9 +104,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - __resource?.ToJson(container, serializationMode); - __baseManagedCluster?.ToJson(container, serializationMode); + __trackedResource?.ToJson(container, serializationMode); AddIf( null != this._sku ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._sku.ToJson(null,serializationMode) : null, "sku" ,container.Add ); + 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 ); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.PowerShell.cs similarity index 80% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.PowerShell.cs index fb0c1993dbf5..8a25cad52280 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.PowerShell.cs @@ -3,11 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// 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 { @@ -55,27 +57,27 @@ public partial class ManagedClusterAadProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IManagedClusterAadProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterAadProfile(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.Api20200901.IManagedClusterAadProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterAadProfile(content); } @@ -85,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged ///
/// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile 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. @@ -103,37 +105,37 @@ internal ManagedClusterAadProfile(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Managed")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).Managed = (bool?) content.GetValueForProperty("Managed",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).Managed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).Managed = (bool?) content.GetValueForProperty("Managed",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).Managed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("EnableAzureRbac")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).EnableAzureRbac = (bool?) content.GetValueForProperty("EnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).EnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).EnableAzureRbac = (bool?) content.GetValueForProperty("EnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).EnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("AdminGroupObjectID")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).AdminGroupObjectID = (string[]) content.GetValueForProperty("AdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).AdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).AdminGroupObjectID = (string[]) content.GetValueForProperty("AdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).AdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("ClientAppId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ClientAppId = (string) content.GetValueForProperty("ClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ClientAppId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ClientAppId = (string) content.GetValueForProperty("ClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ClientAppId, global::System.Convert.ToString); } if (content.Contains("ServerAppId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ServerAppId = (string) content.GetValueForProperty("ServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ServerAppId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ServerAppId = (string) content.GetValueForProperty("ServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ServerAppId, global::System.Convert.ToString); } if (content.Contains("ServerAppSecret")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ServerAppSecret = (string) content.GetValueForProperty("ServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ServerAppSecret, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ServerAppSecret = (string) content.GetValueForProperty("ServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ServerAppSecret, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).TenantId, 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. @@ -148,31 +150,31 @@ internal ManagedClusterAadProfile(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Managed")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).Managed = (bool?) content.GetValueForProperty("Managed",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).Managed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).Managed = (bool?) content.GetValueForProperty("Managed",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).Managed, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("EnableAzureRbac")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).EnableAzureRbac = (bool?) content.GetValueForProperty("EnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).EnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).EnableAzureRbac = (bool?) content.GetValueForProperty("EnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).EnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("AdminGroupObjectID")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).AdminGroupObjectID = (string[]) content.GetValueForProperty("AdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).AdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).AdminGroupObjectID = (string[]) content.GetValueForProperty("AdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).AdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("ClientAppId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ClientAppId = (string) content.GetValueForProperty("ClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ClientAppId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ClientAppId = (string) content.GetValueForProperty("ClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ClientAppId, global::System.Convert.ToString); } if (content.Contains("ServerAppId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ServerAppId = (string) content.GetValueForProperty("ServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ServerAppId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ServerAppId = (string) content.GetValueForProperty("ServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ServerAppId, global::System.Convert.ToString); } if (content.Contains("ServerAppSecret")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ServerAppSecret = (string) content.GetValueForProperty("ServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).ServerAppSecret, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ServerAppSecret = (string) content.GetValueForProperty("ServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).ServerAppSecret, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)this).TenantId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -182,7 +184,7 @@ internal ManagedClusterAadProfile(global::System.Management.Automation.PSObject /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// 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/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.TypeConverter.cs index 0d6229105b06..7dc2999d9e79 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.cs similarity index 71% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.cs index 49be9b6febd8..ef0df9d5b683 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.cs @@ -3,27 +3,31 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// 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.Api20200901.IManagedClusterAadProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal { /// Backing field for property. private string[] _adminGroupObjectID; - /// AAD group object IDs that will have admin role of the cluster. + /// The list of AAD group object IDs that will have admin role of the cluster. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string[] AdminGroupObjectID { get => this._adminGroupObjectID; set => this._adminGroupObjectID = value; } /// Backing field for property. private string _clientAppId; - /// The client AAD application ID. + /// + /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ClientAppId { get => this._clientAppId; set => this._clientAppId = value; } @@ -44,14 +48,18 @@ public partial class ManagedClusterAadProfile : /// Backing field for property. private string _serverAppId; - /// The server AAD application ID. + /// + /// (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ServerAppId { get => this._serverAppId; set => this._serverAppId = value; } /// Backing field for property. private string _serverAppSecret; - /// The server AAD application secret. + /// + /// (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ServerAppSecret { get => this._serverAppSecret; set => this._serverAppSecret = value; } @@ -70,23 +78,25 @@ public ManagedClusterAadProfile() } } - /// 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 { - /// AAD group object IDs that will have admin role of the cluster. + /// The list of AAD group object IDs that will have admin role of the cluster. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"AAD group object IDs that will have admin role of the cluster.", + Description = @"The list of AAD group object IDs that will have admin role of the cluster.", SerializedName = @"adminGroupObjectIDs", PossibleTypes = new [] { typeof(string) })] string[] AdminGroupObjectID { get; set; } - /// The client AAD application ID. + /// + /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The client AAD application ID.", + Description = @"(DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy.", SerializedName = @"clientAppID", PossibleTypes = new [] { typeof(string) })] string ClientAppId { get; set; } @@ -106,19 +116,23 @@ public partial interface IManagedClusterAadProfile : SerializedName = @"managed", PossibleTypes = new [] { typeof(bool) })] bool? Managed { get; set; } - /// The server AAD application ID. + /// + /// (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The server AAD application ID.", + Description = @"(DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy.", SerializedName = @"serverAppID", PossibleTypes = new [] { typeof(string) })] string ServerAppId { get; set; } - /// The server AAD application secret. + /// + /// (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The server AAD application secret.", + Description = @"(DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy.", SerializedName = @"serverAppSecret", PossibleTypes = new [] { typeof(string) })] string ServerAppSecret { get; set; } @@ -134,21 +148,27 @@ public partial interface IManagedClusterAadProfile : string TenantId { get; set; } } - /// 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 { - /// AAD group object IDs that will have admin role of the cluster. + /// The list of AAD group object IDs that will have admin role of the cluster. string[] AdminGroupObjectID { get; set; } - /// The client AAD application ID. + /// + /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// string ClientAppId { get; set; } /// Whether to enable Azure RBAC for Kubernetes authorization. bool? EnableAzureRbac { get; set; } /// Whether to enable managed AAD. bool? Managed { get; set; } - /// The server AAD application ID. + /// + /// (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// string ServerAppId { get; set; } - /// The server AAD application secret. + /// + /// (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + /// string ServerAppSecret { get; set; } /// /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.json.cs index 7ab59aaed208..9d943c29a2d2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAadProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAadProfile.json.cs @@ -3,11 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// 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 { @@ -54,13 +56,13 @@ public partial class ManagedClusterAadProfile 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.Api20200901.IManagedClusterAadProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAadProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAadProfile(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.PowerShell.cs new file mode 100644 index 000000000000..427120de20ab --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.PowerShell.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Managed cluster Access Profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAccessProfileTypeConverter))] + public partial class ManagedClusterAccessProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterAccessProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterAccessProfile(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.Api20230201.IManagedClusterAccessProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterAccessProfile(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.Api20230201.IManagedClusterAccessProfile 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 ManagedClusterAccessProfile(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.Api20230201.IManagedClusterAccessProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AccessProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("KubeConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfileInternal)this).KubeConfig = (byte[]) content.GetValueForProperty("KubeConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfileInternal)this).KubeConfig, i => i); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterAccessProfile(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.Api20230201.IManagedClusterAccessProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AccessProfileTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("KubeConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfileInternal)this).KubeConfig = (byte[]) content.GetValueForProperty("KubeConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfileInternal)this).KubeConfig, i => i); + } + 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(); + } + /// Managed cluster Access Profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAccessProfileTypeConverter))] + public partial interface IManagedClusterAccessProfile + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.TypeConverter.cs index 6b7a8d4e3b5f..b8348626e6a7 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.cs new file mode 100644 index 000000000000..c6c3beface11 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Managed cluster Access Profile. + public partial class ManagedClusterAccessProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfileInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /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.Api30.IResourceInternal)__trackedResource).Id; } + + /// Base64-encoded Kubernetes configuration file. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public byte[] KubeConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfileInternal)Property).KubeConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfileInternal)Property).KubeConfig = value ?? null /* byte array */; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AccessProfile()); set { {_property = value;} } } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Type = value; } + + /// 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.Api30.IResourceInternal)__trackedResource).Name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile _property; + + /// AccessProfile of a managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AccessProfile()); set => this._property = value; } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemData; } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// 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.Api30.IResourceInternal)__trackedResource).Type; } + + /// Creates an new instance. + public ManagedClusterAccessProfile() + { + + } + + /// 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(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// Managed cluster Access Profile. + public partial interface IManagedClusterAccessProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResource + { + /// Base64-encoded Kubernetes configuration file. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Base64-encoded Kubernetes configuration file.", + SerializedName = @"kubeConfig", + PossibleTypes = new [] { typeof(byte[]) })] + byte[] KubeConfig { get; set; } + + } + /// Managed cluster Access Profile. + internal partial interface IManagedClusterAccessProfileInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal + { + /// Base64-encoded Kubernetes configuration file. + byte[] KubeConfig { get; set; } + /// AccessProfile of a managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAccessProfile Property { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.json.cs similarity index 93% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.json.cs index c0eb2ef4e95d..affd3b3682d3 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAccessProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterAccessProfile 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.Api20200901.IManagedClusterAccessProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAccessProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAccessProfile(json) : null; } @@ -77,8 +77,8 @@ internal ManagedClusterAccessProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runt { return; } - __resource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.Resource(json); - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AccessProfile.FromJson(__jsonProperties) : Property;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AccessProfile.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } @@ -101,7 +101,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - __resource?.ToJson(container, serializationMode); + __trackedResource?.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; diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.PowerShell.cs similarity index 79% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.PowerShell.cs index 10410f8ac48e..41dde28e7902 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ManagedClusterAddonProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IManagedClusterAddonProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterAddonProfile(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.Api20200901.IManagedClusterAddonProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterAddonProfile(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile 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. @@ -103,33 +103,33 @@ internal ManagedClusterAddonProfile(global::System.Collections.IDictionary conte // actually deserialize if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentityTypeConverter.ConvertFrom); } if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Config")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Config = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig) content.GetValueForProperty("Config",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Config, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfileConfigTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Config = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig) content.GetValueForProperty("Config",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Config, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfileConfigTypeConverter.ConvertFrom); } if (content.Contains("IdentityResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityResourceId, global::System.Convert.ToString); } if (content.Contains("IdentityClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityClientId, global::System.Convert.ToString); } if (content.Contains("IdentityObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityObjectId, 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. @@ -144,27 +144,27 @@ internal ManagedClusterAddonProfile(global::System.Management.Automation.PSObjec // actually deserialize if (content.Contains("Identity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentityTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentityTypeConverter.ConvertFrom); } if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("Config")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Config = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig) content.GetValueForProperty("Config",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).Config, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfileConfigTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Config = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig) content.GetValueForProperty("Config",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).Config, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfileConfigTypeConverter.ConvertFrom); } if (content.Contains("IdentityResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityResourceId, global::System.Convert.ToString); } if (content.Contains("IdentityClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityClientId, global::System.Convert.ToString); } if (content.Contains("IdentityObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal)this).IdentityObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal)this).IdentityObjectId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.TypeConverter.cs index 55438954fac4..4555e58fccef 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.cs similarity index 72% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.cs index bbf04463b842..2ff8c52f4d9d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// A Kubernetes add-on profile for a managed cluster. public partial class ManagedClusterAddonProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig _config; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig _config; /// Key-value pairs for configuring an add-on. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig Config { get => (this._config = this._config ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfileConfig()); set => this._config = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig Config { get => (this._config = this._config ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfileConfig()); set => this._config = value; } /// Backing field for property. private bool _enabled; @@ -28,26 +28,26 @@ public partial class ManagedClusterAddonProfile : public bool Enabled { get => this._enabled; set => this._enabled = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity _identity; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity _identity; /// Information of user assigned identity used by this add-on. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentity()); } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentity()); } - /// The client id of the user assigned identity. + /// 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.Api20200901.IUserAssignedIdentityInternal)Identity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)Identity).ClientId = value ?? null; } + public string IdentityClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)Identity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)Identity).ClientId = value ?? null; } - /// The object id of the user assigned identity. + /// 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.Api20200901.IUserAssignedIdentityInternal)Identity).ObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)Identity).ObjectId = value ?? null; } + public string IdentityObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)Identity).ObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)Identity).ObjectId = value ?? null; } - /// The resource id of the user assigned identity. + /// 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.Api20200901.IUserAssignedIdentityInternal)Identity).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)Identity).ResourceId = value ?? null; } + public string IdentityResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)Identity).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)Identity).ResourceId = value ?? null; } /// Internal Acessors for Identity - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentity()); set { {_identity = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentity()); set { {_identity = value;} } } /// Creates an new instance. public ManagedClusterAddonProfile() @@ -65,8 +65,8 @@ public partial interface IManagedClusterAddonProfile : ReadOnly = false, Description = @"Key-value pairs for configuring an add-on.", SerializedName = @"config", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig Config { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig Config { get; set; } /// Whether the add-on is enabled or not. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, @@ -75,27 +75,27 @@ public partial interface IManagedClusterAddonProfile : SerializedName = @"enabled", PossibleTypes = new [] { typeof(bool) })] bool Enabled { get; set; } - /// The client id of the user assigned identity. + /// The client ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The client id of the user assigned identity.", + Description = @"The client ID of the user assigned identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] string IdentityClientId { get; set; } - /// The object id of the user assigned identity. + /// The object ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The object id of the user assigned identity.", + Description = @"The object ID of the user assigned identity.", SerializedName = @"objectId", PossibleTypes = new [] { typeof(string) })] string IdentityObjectId { get; set; } - /// The resource id of the user assigned identity. + /// The resource ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The resource id of the user assigned identity.", + Description = @"The resource ID of the user assigned identity.", SerializedName = @"resourceId", PossibleTypes = new [] { typeof(string) })] string IdentityResourceId { get; set; } @@ -106,16 +106,16 @@ internal partial interface IManagedClusterAddonProfileInternal { /// Key-value pairs for configuring an add-on. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig Config { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig Config { get; set; } /// Whether the add-on is enabled or not. bool Enabled { get; set; } /// Information of user assigned identity used by this add-on. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity Identity { get; set; } - /// The client id of the user assigned identity. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity Identity { get; set; } + /// The client ID of the user assigned identity. string IdentityClientId { get; set; } - /// The object id of the user assigned identity. + /// The object ID of the user assigned identity. string IdentityObjectId { get; set; } - /// The resource id of the user assigned identity. + /// The resource ID of the user assigned identity. string IdentityResourceId { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.json.cs index de893e9d5c89..6a6044725a72 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterAddonProfile 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.Api20200901.IManagedClusterAddonProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAddonProfile(json) : null; } @@ -77,9 +77,9 @@ internal ManagedClusterAddonProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runti { return; } - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentity.FromJson(__jsonIdentity) : Identity;} + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentity.FromJson(__jsonIdentity) : Identity;} {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool)__jsonEnabled : Enabled;} - {_config = If( json?.PropertyT("config"), out var __jsonConfig) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfileConfig.FromJson(__jsonConfig) : Config;} + {_config = If( json?.PropertyT("config"), out var __jsonConfig) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfileConfig.FromJson(__jsonConfig) : Config;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.PowerShell.cs similarity index 92% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.PowerShell.cs index b814c65d860b..8c7b7eb28422 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterAddonProfileConfig partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterAddonProfileConfig(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterAddonProfileConfig(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged ///
/// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig 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. @@ -109,7 +109,7 @@ internal ManagedClusterAddonProfileConfig(global::System.Collections.IDictionary } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.TypeConverter.cs index eaea214e9944..88110b217ee2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.cs similarity index 86% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.cs index fb425f9a28b4..0a55973a957a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Key-value pairs for configuring an add-on. public partial class ManagedClusterAddonProfileConfig : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfigInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfigInternal { /// Creates an new instance. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.dictionary.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.dictionary.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.dictionary.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.dictionary.cs index 4915ecf8928f..9154cdb4f2d8 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.dictionary.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAddonProfileConfig source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAddonProfileConfig source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.json.cs index 6dec8cba876e..dda110674c4c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileConfig.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileConfig.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterAddonProfileConfig 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.Api20200901.IManagedClusterAddonProfileConfig. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAddonProfileConfig(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.PowerShell.cs similarity index 86% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.PowerShell.cs index b1a8e86eeda1..60036fb948c1 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterAddonProfileIdentity partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterAddonProfileIdentity(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterAddonProfileIdentity(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileIdentity 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. @@ -107,21 +107,21 @@ internal ManagedClusterAddonProfileIdentity(global::System.Collections.IDictiona // actually deserialize if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ResourceId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("ObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId = (string) content.GetValueForProperty("ObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ObjectId = (string) content.GetValueForProperty("ObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ObjectId, 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. @@ -136,15 +136,15 @@ internal ManagedClusterAddonProfileIdentity(global::System.Management.Automation // actually deserialize if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ResourceId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("ObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId = (string) content.GetValueForProperty("ObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ObjectId = (string) content.GetValueForProperty("ObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ObjectId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.TypeConverter.cs index 761a888b0565..c0cc26d3dbf3 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.cs similarity index 75% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.cs index e8ecc84c98eb..f6d99af61a81 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.cs @@ -3,33 +3,33 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Information of user assigned identity used by this add-on. public partial class ManagedClusterAddonProfileIdentity : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileIdentity, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileIdentityInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileIdentity, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileIdentityInternal, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates { /// - /// Backing field for Inherited model /// - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity __userAssignedIdentity = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentity(); + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity __userAssignedIdentity = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentity(); - /// The client id of the user assigned identity. + /// The client ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ClientId = value ?? null; } + public string ClientId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)__userAssignedIdentity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)__userAssignedIdentity).ClientId = value ?? null; } - /// The object id of the user assigned identity. + /// The object ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ObjectId = value ?? null; } + public string ObjectId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)__userAssignedIdentity).ObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)__userAssignedIdentity).ObjectId = value ?? null; } - /// The resource id of the user assigned identity. + /// The resource ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] - public string ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)__userAssignedIdentity).ResourceId = value ?? null; } + public string ResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)__userAssignedIdentity).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)__userAssignedIdentity).ResourceId = value ?? null; } /// Creates an new instance. public ManagedClusterAddonProfileIdentity() @@ -52,13 +52,13 @@ public ManagedClusterAddonProfileIdentity() /// Information of user assigned identity used by this add-on. public partial interface IManagedClusterAddonProfileIdentity : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity { } /// Information of user assigned identity used by this add-on. internal partial interface IManagedClusterAddonProfileIdentityInternal : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal { } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.json.cs index 042de59d8d76..3eec9da6691c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAddonProfileIdentity.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAddonProfileIdentity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterAddonProfileIdentity 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.Api20200901.IManagedClusterAddonProfileIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfileIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfileIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAddonProfileIdentity(json) : null; } @@ -77,7 +77,7 @@ internal ManagedClusterAddonProfileIdentity(Microsoft.Azure.PowerShell.Cmdlets.A { return; } - __userAssignedIdentity = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentity(json); + __userAssignedIdentity = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentity(json); AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.PowerShell.cs new file mode 100644 index 000000000000..21b4be4dadd8 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.PowerShell.cs @@ -0,0 +1,616 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Profile for the container service agent pool. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfileTypeConverter))] + public partial class ManagedClusterAgentPoolProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterAgentPoolProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterAgentPoolProfile(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.Api20230201.IManagedClusterAgentPoolProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterAgentPoolProfile(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.Api20230201.IManagedClusterAgentPoolProfile 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 ManagedClusterAgentPoolProfile(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.Api20230201.IManagedClusterAgentPoolProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("PowerStateCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + } + if (content.Contains("UpgradeSettingMaxSurge")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuCfsQuota")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuota = (bool?) content.GetValueForProperty("KubeletConfigCpuCfsQuota",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuota, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigCpuCfsQuotaPeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuotaPeriod = (string) content.GetValueForProperty("KubeletConfigCpuCfsQuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuotaPeriod, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigImageGcHighThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcHighThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcHighThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcHighThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigImageGcLowThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcLowThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcLowThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcLowThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigTopologyManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigTopologyManagerPolicy = (string) content.GetValueForProperty("KubeletConfigTopologyManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigTopologyManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigAllowedUnsafeSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigAllowedUnsafeSysctl = (string[]) content.GetValueForProperty("KubeletConfigAllowedUnsafeSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigAllowedUnsafeSysctl, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("KubeletConfigFailSwapOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigFailSwapOn = (bool?) content.GetValueForProperty("KubeletConfigFailSwapOn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigFailSwapOn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigContainerLogMaxSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxSizeMb = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigContainerLogMaxFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxFile = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxFile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxFile, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigPodMaxPid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigPodMaxPid = (int?) content.GetValueForProperty("KubeletConfigPodMaxPid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigPodMaxPid, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigTransparentHugePageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageEnabled = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageEnabled, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigTransparentHugePageDefrag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageDefrag = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageDefrag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageDefrag, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigSwapFileSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSwapFileSizeMb = (int?) content.GetValueForProperty("LinuxOSConfigSwapFileSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSwapFileSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSysctl = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) content.GetValueForProperty("LinuxOSConfigSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSysctl, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationDataSourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerStateTypeConverter.ConvertFrom); + } + if (content.Contains("KubeletConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig) content.GetValueForProperty("KubeletConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfigTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxOSConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig) content.GetValueForProperty("LinuxOSConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationDataTypeConverter.ConvertFrom); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize = (string) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize, global::System.Convert.ToString); + } + if (content.Contains("OSDiskSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); + } + if (content.Contains("KubeletDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType?) content.GetValueForProperty("KubeletDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType.CreateFrom); + } + if (content.Contains("WorkloadRuntime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime?) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime.CreateFrom); + } + if (content.Contains("VnetSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); + } + if (content.Contains("PodSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId, global::System.Convert.ToString); + } + if (content.Contains("MaxPod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + } + if (content.Contains("OSSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku?) content.GetValueForProperty("OSSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku.CreateFrom); + } + if (content.Contains("MaxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnableAutoScaling")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScaleDownMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleDownMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode?) content.GetValueForProperty("ScaleDownMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleDownMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode.CreateFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); + } + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); + } + if (content.Contains("OrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("CurrentOrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CurrentOrchestratorVersion = (string) content.GetValueForProperty("CurrentOrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CurrentOrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("NodeImageVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("EnableNodePublicIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NodePublicIPPrefixId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodePublicIPPrefixId = (string) content.GetValueForProperty("NodePublicIPPrefixId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodePublicIPPrefixId, global::System.Convert.ToString); + } + if (content.Contains("ScaleSetPriority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); + } + if (content.Contains("ScaleSetEvictionPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); + } + if (content.Contains("SpotMaxPrice")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeTaint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ProximityPlacementGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId, global::System.Convert.ToString); + } + if (content.Contains("EnableEncryptionAtHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableEncryptionAtHost = (bool?) content.GetValueForProperty("EnableEncryptionAtHost",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableEncryptionAtHost, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableUltraSsd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableUltraSsd = (bool?) content.GetValueForProperty("EnableUltraSsd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableUltraSsd, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableFips")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableFips = (bool?) content.GetValueForProperty("EnableFips",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableFips, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GpuInstanceProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile?) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile.CreateFrom); + } + if (content.Contains("HostGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId, 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 ManagedClusterAgentPoolProfile(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.Api20230201.IManagedClusterAgentPoolProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("PowerStateCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + } + if (content.Contains("UpgradeSettingMaxSurge")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuCfsQuota")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuota = (bool?) content.GetValueForProperty("KubeletConfigCpuCfsQuota",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuota, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigCpuCfsQuotaPeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuotaPeriod = (string) content.GetValueForProperty("KubeletConfigCpuCfsQuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuotaPeriod, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigImageGcHighThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcHighThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcHighThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcHighThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigImageGcLowThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcLowThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcLowThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcLowThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigTopologyManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigTopologyManagerPolicy = (string) content.GetValueForProperty("KubeletConfigTopologyManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigTopologyManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigAllowedUnsafeSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigAllowedUnsafeSysctl = (string[]) content.GetValueForProperty("KubeletConfigAllowedUnsafeSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigAllowedUnsafeSysctl, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("KubeletConfigFailSwapOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigFailSwapOn = (bool?) content.GetValueForProperty("KubeletConfigFailSwapOn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigFailSwapOn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigContainerLogMaxSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxSizeMb = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigContainerLogMaxFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxFile = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxFile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxFile, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigPodMaxPid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigPodMaxPid = (int?) content.GetValueForProperty("KubeletConfigPodMaxPid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigPodMaxPid, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigTransparentHugePageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageEnabled = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageEnabled, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigTransparentHugePageDefrag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageDefrag = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageDefrag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageDefrag, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigSwapFileSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSwapFileSizeMb = (int?) content.GetValueForProperty("LinuxOSConfigSwapFileSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSwapFileSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSysctl = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) content.GetValueForProperty("LinuxOSConfigSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSysctl, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationDataSourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId, global::System.Convert.ToString); + } + if (content.Contains("UpgradeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerStateTypeConverter.ConvertFrom); + } + if (content.Contains("KubeletConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig) content.GetValueForProperty("KubeletConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfigTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxOSConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig) content.GetValueForProperty("LinuxOSConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationDataTypeConverter.ConvertFrom); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize = (string) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize, global::System.Convert.ToString); + } + if (content.Contains("OSDiskSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); + } + if (content.Contains("KubeletDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType?) content.GetValueForProperty("KubeletDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType.CreateFrom); + } + if (content.Contains("WorkloadRuntime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime?) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime.CreateFrom); + } + if (content.Contains("VnetSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); + } + if (content.Contains("PodSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId, global::System.Convert.ToString); + } + if (content.Contains("MaxPod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + } + if (content.Contains("OSSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku?) content.GetValueForProperty("OSSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku.CreateFrom); + } + if (content.Contains("MaxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnableAutoScaling")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScaleDownMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleDownMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode?) content.GetValueForProperty("ScaleDownMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleDownMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode.CreateFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); + } + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); + } + if (content.Contains("OrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("CurrentOrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CurrentOrchestratorVersion = (string) content.GetValueForProperty("CurrentOrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CurrentOrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("NodeImageVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("EnableNodePublicIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NodePublicIPPrefixId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodePublicIPPrefixId = (string) content.GetValueForProperty("NodePublicIPPrefixId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodePublicIPPrefixId, global::System.Convert.ToString); + } + if (content.Contains("ScaleSetPriority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); + } + if (content.Contains("ScaleSetEvictionPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); + } + if (content.Contains("SpotMaxPrice")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeTaint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ProximityPlacementGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId, global::System.Convert.ToString); + } + if (content.Contains("EnableEncryptionAtHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableEncryptionAtHost = (bool?) content.GetValueForProperty("EnableEncryptionAtHost",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableEncryptionAtHost, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableUltraSsd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableUltraSsd = (bool?) content.GetValueForProperty("EnableUltraSsd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableUltraSsd, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableFips")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableFips = (bool?) content.GetValueForProperty("EnableFips",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableFips, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GpuInstanceProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile?) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile.CreateFrom); + } + if (content.Contains("HostGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId, 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(); + } + /// Profile for the container service agent pool. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfileTypeConverter))] + public partial interface IManagedClusterAgentPoolProfile + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.TypeConverter.cs index ca9c4f162be6..c6b2b6434ca0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.cs new file mode 100644 index 000000000000..ba806d4e9965 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.cs @@ -0,0 +1,410 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Profile for the container service agent pool. + public partial class ManagedClusterAgentPoolProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties __managedClusterAgentPoolProfileProperties = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileProperties(); + + /// + /// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string[] AvailabilityZone { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).AvailabilityZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).AvailabilityZone = value ?? null /* arrayOf */; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? Count { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Count = value ?? default(int); } + + /// + /// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData CreationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CreationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CreationData = value ?? null /* model class */; } + + /// This is the ARM ID of the source object to be used to create the target object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string CreationDataSourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CreationDataSourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string CurrentOrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CurrentOrchestratorVersion; } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableAutoScaling; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public bool? EnableEncryptionAtHost { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableEncryptionAtHost; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableFips; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// The default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public bool? EnableNodePublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableNodePublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableNodePublicIP = value ?? default(bool); } + + /// Whether to enable UltraSSD + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public bool? EnableUltraSsd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableUltraSsd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).EnableUltraSsd = value ?? default(bool); } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile? GpuInstanceProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GpuInstanceProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).GpuInstanceProfile = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile)""); } + + /// + /// 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)] + public string HostGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).HostGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).HostGroupId = value ?? null; } + + /// The Kubelet configuration on the agent pool nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig KubeletConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfig = value ?? null /* model class */; } + + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string[] KubeletConfigAllowedUnsafeSysctl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigAllowedUnsafeSysctl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigAllowedUnsafeSysctl = value ?? null /* arrayOf */; } + + /// + /// The maximum number of container log files that can be present for a container. The number must be ≥ 2. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? KubeletConfigContainerLogMaxFile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigContainerLogMaxFile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigContainerLogMaxFile = value ?? default(int); } + + /// The maximum size (e.g. 10Mi) of container log file before it is rotated. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? KubeletConfigContainerLogMaxSizeMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigContainerLogMaxSizeMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigContainerLogMaxSizeMb = value ?? default(int); } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigCpuCfsQuota; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string KubeletConfigCpuCfsQuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigCpuCfsQuotaPeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// for more information. Allowed values are 'none' and 'static'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string KubeletConfigCpuManagerPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigCpuManagerPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigCpuManagerPolicy = value ?? null; } + + /// + /// If set to true it will make the Kubelet fail to start if swap is enabled on the node. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public bool? KubeletConfigFailSwapOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigFailSwapOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigFailSwapOn = value ?? default(bool); } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigImageGcHighThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigImageGcHighThreshold = value ?? default(int); } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigImageGcLowThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigImageGcLowThreshold = value ?? default(int); } + + /// The maximum number of processes per pod. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? KubeletConfigPodMaxPid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigPodMaxPid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigPodMaxPid = value ?? default(int); } + + /// + /// 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)] + public string KubeletConfigTopologyManagerPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigTopologyManagerPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletConfigTopologyManagerPolicy = value ?? null; } + + /// + /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType? KubeletDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).KubeletDiskType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType)""); } + + /// The OS configuration of Linux agent nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig LinuxOSConfig { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfig; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfig = value ?? null /* model class */; } + + /// The size in MB of a swap file that will be created on each node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? LinuxOSConfigSwapFileSizeMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigSwapFileSizeMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigSwapFileSizeMb = value ?? default(int); } + + /// Sysctl settings for Linux agent nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig LinuxOSConfigSysctl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigSysctl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string LinuxOSConfigTransparentHugePageDefrag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigTransparentHugePageDefrag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string LinuxOSConfigTransparentHugePageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigTransparentHugePageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).LinuxOSConfigTransparentHugePageEnabled = value ?? null; } + + /// The maximum number of nodes for auto-scaling + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? MaxCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MaxCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MaxCount = value ?? default(int); } + + /// The maximum number of pods that can run on a node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? MaxPod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MaxPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MaxPod = value ?? default(int); } + + /// Internal Acessors for CurrentOrchestratorVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.CurrentOrchestratorVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CurrentOrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).CurrentOrchestratorVersion = value; } + + /// Internal Acessors for NodeImageVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion = value; } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState = value; } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).MinCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Mode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Mode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode)""); } + + /// Backing field for property. + private string _name; + + /// 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; } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeImageVersion; } + + /// The node labels to be persisted across all nodes in agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeLabel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeLabel = value ?? null /* model class */; } + + /// + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodePublicIPPrefixId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodePublicIPPrefixId = value ?? null; } + + /// + /// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string[] NodeTaint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeTaint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).NodeTaint = value ?? null /* arrayOf */; } + + /// + /// OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it + /// will apply the default osDisk size according to the vmSize specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public int? OSDiskSizeGb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskSizeGb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSDiskType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType)""); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSSku = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku)""); } + + /// The operating system type. The default is Linux. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OSType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType)""); } + + /// + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).OrchestratorVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string PodSubnetId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PodSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState PowerState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerState = value ?? null /* model class */; } + + /// Tells whether the cluster is Running or Stopped + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerStateCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).PowerStateCode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProvisioningState; } + + /// The ID for Proximity Placement Group. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string ProximityPlacementGroupId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProximityPlacementGroupId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ProximityPlacementGroupId = value ?? null; } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode? ScaleDownMode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleDownMode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleDownMode = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode)""); } + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetEvictionPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetEvictionPolicy = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy)""); } + + /// + /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? ScaleSetPriority { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetPriority; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).ScaleSetPriority = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority)""); } + + /// + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SpotMaxPrice; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).SpotMaxPrice = value ?? default(float); } + + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Tag = value ?? null /* model class */; } + + /// The type of Agent Pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).Type = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType)""); } + + /// Settings for upgrading the agentpool + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings UpgradeSetting { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSetting; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string UpgradeSettingMaxSurge { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).UpgradeSettingMaxSurge; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string VMSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VMSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VMSize = value ?? null; } + + /// + /// 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VnetSubnetId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).VnetSubnetId = value ?? null; } + + /// Determines the type of workload a node can run. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime? WorkloadRuntime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).WorkloadRuntime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)__managedClusterAgentPoolProfileProperties).WorkloadRuntime = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime)""); } + + /// Creates an new instance. + public ManagedClusterAgentPoolProfile() + { + + } + + /// 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(__managedClusterAgentPoolProfileProperties), __managedClusterAgentPoolProfileProperties); + await eventListener.AssertObjectIsValid(nameof(__managedClusterAgentPoolProfileProperties), __managedClusterAgentPoolProfileProperties); + } + } + /// Profile for the container service agent pool. + public partial interface IManagedClusterAgentPoolProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties + { + /// Windows agent pool names must be 6 characters or less. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Windows agent pool names must be 6 characters or less.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + + } + /// Profile for the container service agent pool. + internal partial interface IManagedClusterAgentPoolProfileInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal + { + /// Windows agent pool names must be 6 characters or less. + string Name { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.json.cs index 8bba5f3482b9..0d1cfca865cd 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterAgentPoolProfile 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.Api20200901.IManagedClusterAgentPoolProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAgentPoolProfile(json) : null; } @@ -77,7 +77,7 @@ internal ManagedClusterAgentPoolProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.R { return; } - __managedClusterAgentPoolProfileProperties = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfileProperties(json); + __managedClusterAgentPoolProfileProperties = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileProperties(json); {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.PowerShell.cs new file mode 100644 index 000000000000..d8f82240f22b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.PowerShell.cs @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Properties for the container service agent pool profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfilePropertiesTypeConverter))] + public partial class ManagedClusterAgentPoolProfileProperties + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterAgentPoolProfileProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterAgentPoolProfileProperties(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.Api20230201.IManagedClusterAgentPoolProfileProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterAgentPoolProfileProperties(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.Api20230201.IManagedClusterAgentPoolProfileProperties 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 ManagedClusterAgentPoolProfileProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("UpgradeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerStateTypeConverter.ConvertFrom); + } + if (content.Contains("KubeletConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig) content.GetValueForProperty("KubeletConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfigTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxOSConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig) content.GetValueForProperty("LinuxOSConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationDataTypeConverter.ConvertFrom); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize = (string) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize, global::System.Convert.ToString); + } + if (content.Contains("OSDiskSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); + } + if (content.Contains("KubeletDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType?) content.GetValueForProperty("KubeletDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType.CreateFrom); + } + if (content.Contains("WorkloadRuntime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime?) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime.CreateFrom); + } + if (content.Contains("VnetSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); + } + if (content.Contains("PodSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId, global::System.Convert.ToString); + } + if (content.Contains("MaxPod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + } + if (content.Contains("OSSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku?) content.GetValueForProperty("OSSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku.CreateFrom); + } + if (content.Contains("MaxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnableAutoScaling")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScaleDownMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleDownMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode?) content.GetValueForProperty("ScaleDownMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleDownMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode.CreateFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); + } + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); + } + if (content.Contains("OrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("CurrentOrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CurrentOrchestratorVersion = (string) content.GetValueForProperty("CurrentOrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CurrentOrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("NodeImageVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("EnableNodePublicIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NodePublicIPPrefixId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodePublicIPPrefixId = (string) content.GetValueForProperty("NodePublicIPPrefixId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodePublicIPPrefixId, global::System.Convert.ToString); + } + if (content.Contains("ScaleSetPriority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); + } + if (content.Contains("ScaleSetEvictionPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); + } + if (content.Contains("SpotMaxPrice")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeTaint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ProximityPlacementGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId, global::System.Convert.ToString); + } + if (content.Contains("EnableEncryptionAtHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableEncryptionAtHost = (bool?) content.GetValueForProperty("EnableEncryptionAtHost",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableEncryptionAtHost, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableUltraSsd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableUltraSsd = (bool?) content.GetValueForProperty("EnableUltraSsd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableUltraSsd, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableFips")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableFips = (bool?) content.GetValueForProperty("EnableFips",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableFips, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GpuInstanceProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile?) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile.CreateFrom); + } + if (content.Contains("HostGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId, global::System.Convert.ToString); + } + if (content.Contains("PowerStateCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + } + if (content.Contains("UpgradeSettingMaxSurge")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuCfsQuota")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuota = (bool?) content.GetValueForProperty("KubeletConfigCpuCfsQuota",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuota, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigCpuCfsQuotaPeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuotaPeriod = (string) content.GetValueForProperty("KubeletConfigCpuCfsQuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuotaPeriod, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigImageGcHighThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcHighThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcHighThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcHighThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigImageGcLowThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcLowThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcLowThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcLowThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigTopologyManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigTopologyManagerPolicy = (string) content.GetValueForProperty("KubeletConfigTopologyManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigTopologyManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigAllowedUnsafeSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigAllowedUnsafeSysctl = (string[]) content.GetValueForProperty("KubeletConfigAllowedUnsafeSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigAllowedUnsafeSysctl, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("KubeletConfigFailSwapOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigFailSwapOn = (bool?) content.GetValueForProperty("KubeletConfigFailSwapOn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigFailSwapOn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigContainerLogMaxSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxSizeMb = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigContainerLogMaxFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxFile = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxFile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxFile, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigPodMaxPid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigPodMaxPid = (int?) content.GetValueForProperty("KubeletConfigPodMaxPid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigPodMaxPid, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigTransparentHugePageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageEnabled = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageEnabled, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigTransparentHugePageDefrag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageDefrag = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageDefrag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageDefrag, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigSwapFileSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSwapFileSizeMb = (int?) content.GetValueForProperty("LinuxOSConfigSwapFileSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSwapFileSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSysctl = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) content.GetValueForProperty("LinuxOSConfigSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSysctl, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationDataSourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId, 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 ManagedClusterAgentPoolProfileProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("UpgradeSetting")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings) content.GetValueForProperty("UpgradeSetting",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSetting, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeSettingsTypeConverter.ConvertFrom); + } + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerStateTypeConverter.ConvertFrom); + } + if (content.Contains("KubeletConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig) content.GetValueForProperty("KubeletConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfigTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxOSConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig) content.GetValueForProperty("LinuxOSConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationDataTypeConverter.ConvertFrom); + } + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize = (string) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VMSize, global::System.Convert.ToString); + } + if (content.Contains("OSDiskSizeGb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb = (int?) content.GetValueForProperty("OSDiskSizeGb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskSizeGb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType?) content.GetValueForProperty("OSDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType.CreateFrom); + } + if (content.Contains("KubeletDiskType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletDiskType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType?) content.GetValueForProperty("KubeletDiskType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletDiskType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType.CreateFrom); + } + if (content.Contains("WorkloadRuntime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime?) content.GetValueForProperty("WorkloadRuntime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).WorkloadRuntime, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime.CreateFrom); + } + if (content.Contains("VnetSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId = (string) content.GetValueForProperty("VnetSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).VnetSubnetId, global::System.Convert.ToString); + } + if (content.Contains("PodSubnetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId = (string) content.GetValueForProperty("PodSubnetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PodSubnetId, global::System.Convert.ToString); + } + if (content.Contains("MaxPod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod = (int?) content.GetValueForProperty("MaxPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxPod, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + } + if (content.Contains("OSSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku?) content.GetValueForProperty("OSSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OSSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku.CreateFrom); + } + if (content.Contains("MaxCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount = (int?) content.GetValueForProperty("MaxCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MaxCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("MinCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount = (int?) content.GetValueForProperty("MinCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).MinCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnableAutoScaling")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling = (bool?) content.GetValueForProperty("EnableAutoScaling",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableAutoScaling, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ScaleDownMode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleDownMode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode?) content.GetValueForProperty("ScaleDownMode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleDownMode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode.CreateFrom); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType.CreateFrom); + } + if (content.Contains("Mode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode?) content.GetValueForProperty("Mode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Mode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode.CreateFrom); + } + if (content.Contains("OrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion = (string) content.GetValueForProperty("OrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).OrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("CurrentOrchestratorVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CurrentOrchestratorVersion = (string) content.GetValueForProperty("CurrentOrchestratorVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CurrentOrchestratorVersion, global::System.Convert.ToString); + } + if (content.Contains("NodeImageVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeImageVersion, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("AvailabilityZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone = (string[]) content.GetValueForProperty("AvailabilityZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).AvailabilityZone, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("EnableNodePublicIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP = (bool?) content.GetValueForProperty("EnableNodePublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableNodePublicIP, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NodePublicIPPrefixId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodePublicIPPrefixId = (string) content.GetValueForProperty("NodePublicIPPrefixId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodePublicIPPrefixId, global::System.Convert.ToString); + } + if (content.Contains("ScaleSetPriority")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority?) content.GetValueForProperty("ScaleSetPriority",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetPriority, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority.CreateFrom); + } + if (content.Contains("ScaleSetEvictionPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy?) content.GetValueForProperty("ScaleSetEvictionPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ScaleSetEvictionPolicy, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy.CreateFrom); + } + if (content.Contains("SpotMaxPrice")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice = (float?) content.GetValueForProperty("SpotMaxPrice",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).SpotMaxPrice, (__y)=> (float) global::System.Convert.ChangeType(__y, typeof(float))); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeLabel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels) content.GetValueForProperty("NodeLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter.ConvertFrom); + } + if (content.Contains("NodeTaint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint = (string[]) content.GetValueForProperty("NodeTaint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).NodeTaint, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ProximityPlacementGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId = (string) content.GetValueForProperty("ProximityPlacementGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).ProximityPlacementGroupId, global::System.Convert.ToString); + } + if (content.Contains("EnableEncryptionAtHost")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableEncryptionAtHost = (bool?) content.GetValueForProperty("EnableEncryptionAtHost",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableEncryptionAtHost, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableUltraSsd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableUltraSsd = (bool?) content.GetValueForProperty("EnableUltraSsd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableUltraSsd, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnableFips")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableFips = (bool?) content.GetValueForProperty("EnableFips",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).EnableFips, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GpuInstanceProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile?) content.GetValueForProperty("GpuInstanceProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).GpuInstanceProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile.CreateFrom); + } + if (content.Contains("HostGroupId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId = (string) content.GetValueForProperty("HostGroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).HostGroupId, global::System.Convert.ToString); + } + if (content.Contains("PowerStateCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + } + if (content.Contains("UpgradeSettingMaxSurge")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge = (string) content.GetValueForProperty("UpgradeSettingMaxSurge",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).UpgradeSettingMaxSurge, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy = (string) content.GetValueForProperty("KubeletConfigCpuManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigCpuCfsQuota")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuota = (bool?) content.GetValueForProperty("KubeletConfigCpuCfsQuota",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuota, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigCpuCfsQuotaPeriod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuotaPeriod = (string) content.GetValueForProperty("KubeletConfigCpuCfsQuotaPeriod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigCpuCfsQuotaPeriod, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigImageGcHighThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcHighThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcHighThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcHighThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigImageGcLowThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcLowThreshold = (int?) content.GetValueForProperty("KubeletConfigImageGcLowThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigImageGcLowThreshold, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigTopologyManagerPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigTopologyManagerPolicy = (string) content.GetValueForProperty("KubeletConfigTopologyManagerPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigTopologyManagerPolicy, global::System.Convert.ToString); + } + if (content.Contains("KubeletConfigAllowedUnsafeSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigAllowedUnsafeSysctl = (string[]) content.GetValueForProperty("KubeletConfigAllowedUnsafeSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigAllowedUnsafeSysctl, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("KubeletConfigFailSwapOn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigFailSwapOn = (bool?) content.GetValueForProperty("KubeletConfigFailSwapOn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigFailSwapOn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeletConfigContainerLogMaxSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxSizeMb = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigContainerLogMaxFile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxFile = (int?) content.GetValueForProperty("KubeletConfigContainerLogMaxFile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigContainerLogMaxFile, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubeletConfigPodMaxPid")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigPodMaxPid = (int?) content.GetValueForProperty("KubeletConfigPodMaxPid",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).KubeletConfigPodMaxPid, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigTransparentHugePageEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageEnabled = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageEnabled, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigTransparentHugePageDefrag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageDefrag = (string) content.GetValueForProperty("LinuxOSConfigTransparentHugePageDefrag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigTransparentHugePageDefrag, global::System.Convert.ToString); + } + if (content.Contains("LinuxOSConfigSwapFileSizeMb")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSwapFileSizeMb = (int?) content.GetValueForProperty("LinuxOSConfigSwapFileSizeMb",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSwapFileSizeMb, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("LinuxOSConfigSysctl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSysctl = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) content.GetValueForProperty("LinuxOSConfigSysctl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).LinuxOSConfigSysctl, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SysctlConfigTypeConverter.ConvertFrom); + } + if (content.Contains("CreationDataSourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal)this).CreationDataSourceResourceId, 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(); + } + /// Properties for the container service agent pool profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfilePropertiesTypeConverter))] + public partial interface IManagedClusterAgentPoolProfileProperties + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.TypeConverter.cs index f557346e9b20..4d9d66878adc 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.cs new file mode 100644 index 000000000000..bc54b7efaa09 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.cs @@ -0,0 +1,1248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Properties for the container service agent pool profile. + public partial class ManagedClusterAgentPoolProfileProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal + { + + /// Backing field for property. + private string[] _availabilityZone; + + /// + /// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string[] AvailabilityZone { get => this._availabilityZone; set => this._availabilityZone = value; } + + /// Backing field for property. + private int? _count; + + /// + /// Number of agents (VMs) to host docker containers. Allowed values must be in the range of 0 to 1000 (inclusive) for user + /// pools and in the range of 1 to 1000 (inclusive) for system pools. The default value is 1. + /// + [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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData _creationData; + + /// + /// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData CreationData { get => (this._creationData = this._creationData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationData()); set => this._creationData = value; } + + /// This is the ARM ID of the source object to be used to create the target object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string CreationDataSourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationDataInternal)CreationData).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationDataInternal)CreationData).SourceResourceId = value ?? null; } + + /// Backing field for property. + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string CurrentOrchestratorVersion { get => this._currentOrchestratorVersion; } + + /// Backing field for property. + private bool? _enableAutoScaling; + + /// Whether to enable auto-scaler + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnableAutoScaling { get => this._enableAutoScaling; set => this._enableAutoScaling = value; } + + /// Backing field for property. + 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnableEncryptionAtHost { get => this._enableEncryptionAtHost; set => this._enableEncryptionAtHost = value; } + + /// Backing field for property. + 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) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnableFips { get => this._enableFips; set => this._enableFips = value; } + + /// Backing field for property. + 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). + /// The default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnableNodePublicIP { get => this._enableNodePublicIP; set => this._enableNodePublicIP = value; } + + /// Backing field for property. + private bool? _enableUltraSsd; + + /// Whether to enable UltraSSD + [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.Support.GpuInstanceProfile? _gpuInstanceProfile; + + /// + /// 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.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile? GpuInstanceProfile { get => this._gpuInstanceProfile; set => this._gpuInstanceProfile = value; } + + /// Backing field for property. + private string _hostGroupId; + + /// + /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string HostGroupId { get => this._hostGroupId; set => this._hostGroupId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig _kubeletConfig; + + /// The Kubelet configuration on the agent pool nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig KubeletConfig { get => (this._kubeletConfig = this._kubeletConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfig()); set => this._kubeletConfig = value; } + + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string[] KubeletConfigAllowedUnsafeSysctl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).AllowedUnsafeSysctl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).AllowedUnsafeSysctl = value ?? null /* arrayOf */; } + + /// + /// The maximum number of container log files that can be present for a container. The number must be ≥ 2. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? KubeletConfigContainerLogMaxFile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).ContainerLogMaxFile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).ContainerLogMaxFile = value ?? default(int); } + + /// The maximum size (e.g. 10Mi) of container log file before it is rotated. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? KubeletConfigContainerLogMaxSizeMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).ContainerLogMaxSizeMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).ContainerLogMaxSizeMb = value ?? default(int); } + + /// 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.Api20230201.IKubeletConfigInternal)KubeletConfig).CpuCfsQuota; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeletConfigCpuCfsQuotaPeriod { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).CpuCfsQuotaPeriod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// for more information. Allowed values are 'none' and 'static'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeletConfigCpuManagerPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).CpuManagerPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).CpuManagerPolicy = value ?? null; } + + /// + /// If set to true it will make the Kubelet fail to start if swap is enabled on the node. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? KubeletConfigFailSwapOn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).FailSwapOn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).FailSwapOn = value ?? default(bool); } + + /// 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.Api20230201.IKubeletConfigInternal)KubeletConfig).ImageGcHighThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).ImageGcHighThreshold = value ?? default(int); } + + /// 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.Api20230201.IKubeletConfigInternal)KubeletConfig).ImageGcLowThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).ImageGcLowThreshold = value ?? default(int); } + + /// The maximum number of processes per pod. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? KubeletConfigPodMaxPid { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).PodMaxPid; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).PodMaxPid = value ?? default(int); } + + /// + /// 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)] + public string KubeletConfigTopologyManagerPolicy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).TopologyManagerPolicy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfigInternal)KubeletConfig).TopologyManagerPolicy = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType? _kubeletDiskType; + + /// + /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType? KubeletDiskType { get => this._kubeletDiskType; set => this._kubeletDiskType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig _linuxOSConfig; + + /// The OS configuration of Linux agent nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig LinuxOSConfig { get => (this._linuxOSConfig = this._linuxOSConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfig()); set => this._linuxOSConfig = value; } + + /// The size in MB of a swap file that will be created on each node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? LinuxOSConfigSwapFileSizeMb { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)LinuxOSConfig).SwapFileSizeMb; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)LinuxOSConfig).SwapFileSizeMb = value ?? default(int); } + + /// Sysctl settings for Linux agent nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig LinuxOSConfigSysctl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)LinuxOSConfig).Sysctl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string LinuxOSConfigTransparentHugePageDefrag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)LinuxOSConfig).TransparentHugePageDefrag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string LinuxOSConfigTransparentHugePageEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)LinuxOSConfig).TransparentHugePageEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfigInternal)LinuxOSConfig).TransparentHugePageEnabled = value ?? null; } + + /// Backing field for property. + private int? _maxCount; + + /// The maximum number of nodes for auto-scaling + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? MaxCount { get => this._maxCount; set => this._maxCount = value; } + + /// Backing field for property. + private int? _maxPod; + + /// The maximum number of pods that can run on a node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? MaxPod { get => this._maxPod; set => this._maxPod = value; } + + /// Internal Acessors for CreationData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.CreationData { get => (this._creationData = this._creationData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationData()); set { {_creationData = value;} } } + + /// Internal Acessors for CurrentOrchestratorVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.CurrentOrchestratorVersion { get => this._currentOrchestratorVersion; set { {_currentOrchestratorVersion = value;} } } + + /// Internal Acessors for KubeletConfig + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.KubeletConfig { get => (this._kubeletConfig = this._kubeletConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfig()); set { {_kubeletConfig = value;} } } + + /// Internal Acessors for LinuxOSConfig + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.LinuxOSConfig { get => (this._linuxOSConfig = this._linuxOSConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfig()); set { {_linuxOSConfig = value;} } } + + /// Internal Acessors for NodeImageVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.NodeImageVersion { get => this._nodeImageVersion; set { {_nodeImageVersion = value;} } } + + /// Internal Acessors for PowerState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerState()); set { {_powerState = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for UpgradeSetting + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesInternal.UpgradeSetting { get => (this._upgradeSetting = this._upgradeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeSettings()); set { {_upgradeSetting = value;} } } + + /// Backing field for property. + private int? _minCount; + + /// The minimum number of nodes for auto-scaling + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? MinCount { get => this._minCount; set => this._minCount = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? _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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get => this._mode; set => this._mode = value; } + + /// Backing field for property. + private string _nodeImageVersion; + + /// The version of node image + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string NodeImageVersion { get => this._nodeImageVersion; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels _nodeLabel; + + /// The node labels to be persisted across all nodes in agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get => (this._nodeLabel = this._nodeLabel ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabels()); set => this._nodeLabel = value; } + + /// Backing field for property. + private string _nodePublicIPPrefixId; + + /// + /// 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; } + + /// Backing field for property. + private string[] _nodeTaint; + + /// + /// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string[] NodeTaint { get => this._nodeTaint; set => this._nodeTaint = value; } + + /// Backing field for property. + private int? _oSDiskSizeGb; + + /// + /// OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it + /// will apply the default osDisk size according to the vmSize specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? OSDiskSizeGb { get => this._oSDiskSizeGb; set => this._oSDiskSizeGb = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? _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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get => this._oSDiskType; set => this._oSDiskType = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? _oSSku; + + /// + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + /// Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get => this._oSSku; set => this._oSSku = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? _oSType; + + /// The operating system type. The default is Linux. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get => this._oSType; set => this._oSType = value; } + + /// Backing field for property. + 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). + /// + [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 _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} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string PodSubnetId { get => this._podSubnetId; set => this._podSubnetId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerState()); set => this._powerState = value; } + + /// Tells whether the cluster is Running or Stopped + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerStateInternal)PowerState).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerStateInternal)PowerState).Code = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } + + /// Backing field for property. + private string _provisioningState; + + /// The current deployment or provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private string _proximityPlacementGroupId; + + /// The ID for Proximity Placement Group. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ProximityPlacementGroupId { get => this._proximityPlacementGroupId; set => this._proximityPlacementGroupId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode? _scaleDownMode; + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode? ScaleDownMode { get => this._scaleDownMode; set => this._scaleDownMode = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? _scaleSetEvictionPolicy; + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get => this._scaleSetEvictionPolicy; set => this._scaleSetEvictionPolicy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? _scaleSetPriority; + + /// + /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? ScaleSetPriority { get => this._scaleSetPriority; set => this._scaleSetPriority = value; } + + /// 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) + /// + [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.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags _tag; + + /// 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.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTags()); set => this._tag = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? _type; + + /// The type of Agent Pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? Type { get => this._type; set => this._type = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings _upgradeSetting; + + /// Settings for upgrading the agentpool + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettings UpgradeSetting { get => (this._upgradeSetting = this._upgradeSetting ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string UpgradeSettingMaxSurge { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).MaxSurge; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeSettingsInternal)UpgradeSetting).MaxSurge = 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 + /// + [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 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} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string VnetSubnetId { get => this._vnetSubnetId; set => this._vnetSubnetId = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime? _workloadRuntime; + + /// Determines the type of workload a node can run. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime? WorkloadRuntime { get => this._workloadRuntime; set => this._workloadRuntime = value; } + + /// + /// Creates an new instance. + /// + public ManagedClusterAgentPoolProfileProperties() + { + + } + } + /// Properties for the container service agent pool profile. + public partial interface IManagedClusterAgentPoolProfileProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'.", + SerializedName = @"availabilityZones", + PossibleTypes = new [] { typeof(string) })] + string[] AvailabilityZone { 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? Count { get; set; } + /// This is the ARM ID of the source object to be used to create the target object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the ARM ID of the source object to be used to create the target object.", + SerializedName = @"sourceResourceId", + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + 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.", + SerializedName = @"currentOrchestratorVersion", + PossibleTypes = new [] { typeof(string) })] + string CurrentOrchestratorVersion { get; } + /// Whether to enable auto-scaler + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable auto-scaler", + SerializedName = @"enableAutoScaling", + 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + 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) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + 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). + /// The default is false. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"enableNodePublicIP", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableNodePublicIP { get; set; } + /// Whether to enable UltraSSD + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable UltraSSD", + SerializedName = @"enableUltraSSD", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableUltraSsd { get; set; } + /// + /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU.", + SerializedName = @"gpuInstanceProfile", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile? GpuInstanceProfile { get; set; } + /// + /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"hostGroupID", + PossibleTypes = new [] { typeof(string) })] + string HostGroupId { get; set; } + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`).", + SerializedName = @"allowedUnsafeSysctls", + PossibleTypes = new [] { typeof(string) })] + string[] KubeletConfigAllowedUnsafeSysctl { get; set; } + /// + /// The maximum number of container log files that can be present for a container. The number must be ≥ 2. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of container log files that can be present for a container. The number must be ≥ 2.", + SerializedName = @"containerLogMaxFiles", + PossibleTypes = new [] { typeof(int) })] + int? KubeletConfigContainerLogMaxFile { get; set; } + /// The maximum size (e.g. 10Mi) of container log file before it is rotated. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum size (e.g. 10Mi) of container log file before it is rotated.", + SerializedName = @"containerLogMaxSizeMB", + PossibleTypes = new [] { typeof(int) })] + int? KubeletConfigContainerLogMaxSizeMb { get; set; } + /// The default is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + 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) + /// for more information. Allowed values are 'none' and 'static'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + SerializedName = @"cpuManagerPolicy", + PossibleTypes = new [] { typeof(string) })] + string KubeletConfigCpuManagerPolicy { get; set; } + /// + /// If set to true it will make the Kubelet fail to start if swap is enabled on the node. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"If set to true it will make the Kubelet fail to start if swap is enabled on the node.", + SerializedName = @"failSwapOn", + PossibleTypes = new [] { typeof(bool) })] + bool? KubeletConfigFailSwapOn { get; set; } + /// To disable image garbage collection, set to 100. The default is 85% + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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% + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This cannot be set higher than imageGcHighThreshold. The default is 80%", + SerializedName = @"imageGcLowThreshold", + PossibleTypes = new [] { typeof(int) })] + int? KubeletConfigImageGcLowThreshold { get; set; } + /// The maximum number of processes per pod. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of processes per pod.", + SerializedName = @"podMaxPids", + 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 default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + SerializedName = @"topologyManagerPolicy", + PossibleTypes = new [] { typeof(string) })] + string KubeletConfigTopologyManagerPolicy { get; set; } + /// + /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage.", + SerializedName = @"kubeletDiskType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType? KubeletDiskType { get; set; } + /// The size in MB of a swap file that will be created on each node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The size in MB of a swap file that will be created on each node.", + SerializedName = @"swapFileSizeMB", + PossibleTypes = new [] { typeof(int) })] + int? LinuxOSConfigSwapFileSizeMb { get; set; } + /// Sysctl settings for Linux agent nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl settings for Linux agent nodes.", + SerializedName = @"sysctls", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"transparentHugePageEnabled", + PossibleTypes = new [] { typeof(string) })] + string LinuxOSConfigTransparentHugePageEnabled { get; set; } + /// The maximum number of nodes for auto-scaling + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of nodes for auto-scaling", + SerializedName = @"maxCount", + PossibleTypes = new [] { typeof(int) })] + int? MaxCount { get; set; } + /// The maximum number of pods that can run on a node. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The maximum number of pods that can run on a node.", + SerializedName = @"maxPods", + PossibleTypes = new [] { typeof(int) })] + int? MaxPod { get; set; } + /// The minimum number of nodes for auto-scaling + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The minimum number of nodes for auto-scaling", + SerializedName = @"minCount", + 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + SerializedName = @"mode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { get; set; } + /// The version of node image + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The version of node image", + SerializedName = @"nodeImageVersion", + PossibleTypes = new [] { typeof(string) })] + string NodeImageVersion { get; } + /// The node labels to be persisted across all nodes in agent pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The node labels to be persisted across all nodes in agent pool.", + SerializedName = @"nodeLabels", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } + /// + /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName}", + SerializedName = @"nodePublicIPPrefixID", + PossibleTypes = new [] { typeof(string) })] + string NodePublicIPPrefixId { get; set; } + /// + /// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule.", + SerializedName = @"nodeTaints", + PossibleTypes = new [] { typeof(string) })] + string[] NodeTaint { get; set; } + /// + /// OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it + /// will apply the default osDisk size according to the vmSize specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it will apply the default osDisk size according to the vmSize specified.", + SerializedName = @"osDiskSizeGB", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"osDiskType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get; set; } + /// + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + /// Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get; set; } + /// The operating system type. The default is Linux. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The operating system type. The default is Linux.", + SerializedName = @"osType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + 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} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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}", + SerializedName = @"podSubnetID", + PossibleTypes = new [] { typeof(string) })] + string PodSubnetId { get; set; } + /// Tells whether the cluster is Running or Stopped + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tells whether the cluster is Running or Stopped", + SerializedName = @"code", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } + /// The current deployment or provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current deployment or provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// The ID for Proximity Placement Group. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ID for Proximity Placement Group.", + SerializedName = @"proximityPlacementGroupID", + PossibleTypes = new [] { typeof(string) })] + string ProximityPlacementGroupId { get; set; } + /// + /// This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This also effects the cluster autoscaler behavior. If not specified, it defaults to Delete.", + SerializedName = @"scaleDownMode", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode? ScaleDownMode { get; set; } + /// + /// 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, + ReadOnly = false, + Description = @"This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'.", + SerializedName = @"scaleSetEvictionPolicy", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get; set; } + /// + /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'.", + SerializedName = @"scaleSetPriority", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? 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) + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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)", + SerializedName = @"spotMaxPrice", + PossibleTypes = new [] { typeof(float) })] + float? SpotMaxPrice { get; set; } + /// The tags to be persisted on the agent pool virtual machine scale set. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The tags to be persisted on the agent pool virtual machine scale set.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags Tag { get; set; } + /// The type of Agent Pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of Agent Pool.", + SerializedName = @"type", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + 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 + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + SerializedName = @"vmSize", + PossibleTypes = new [] { typeof(string) })] + string VMSize { 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} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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}", + SerializedName = @"vnetSubnetID", + PossibleTypes = new [] { typeof(string) })] + string VnetSubnetId { get; set; } + /// Determines the type of workload a node can run. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Determines the type of workload a node can run.", + SerializedName = @"workloadRuntime", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime? WorkloadRuntime { get; set; } + + } + /// Properties for the container service agent pool profile. + internal partial interface IManagedClusterAgentPoolProfilePropertiesInternal + + { + /// + /// The list of Availability zones to use for nodes. This can only be specified if the AgentPoolType property is 'VirtualMachineScaleSets'. + /// + string[] AvailabilityZone { 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. + /// + int? Count { get; set; } + /// + /// CreationData to be used to specify the source Snapshot ID if the node pool will be created/upgraded using a snapshot. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData CreationData { get; set; } + /// 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. + /// + string CurrentOrchestratorVersion { 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 + /// + 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) + /// 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). + /// The default is false. + /// + bool? EnableNodePublicIP { get; set; } + /// Whether to enable UltraSSD + bool? EnableUltraSsd { get; set; } + /// + /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile? GpuInstanceProfile { get; set; } + /// + /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/hostGroups/{hostGroupName}. + /// For more information see [Azure dedicated hosts](https://docs.microsoft.com/azure/virtual-machines/dedicated-hosts). + /// + string HostGroupId { get; set; } + /// The Kubelet configuration on the agent pool nodes. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IKubeletConfig KubeletConfig { get; set; } + /// Allowed list of unsafe sysctls or unsafe sysctl patterns (ending in `*`). + string[] KubeletConfigAllowedUnsafeSysctl { get; set; } + /// + /// The maximum number of container log files that can be present for a container. The number must be ≥ 2. + /// + 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. + 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'. + /// + 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) + /// for more information. Allowed values are 'none' and 'static'. + /// + string KubeletConfigCpuManagerPolicy { get; set; } + /// + /// 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% + int? KubeletConfigImageGcHighThreshold { get; set; } + /// 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 default is 'none'. Allowed values are 'none', 'best-effort', 'restricted', and 'single-numa-node'. + /// + string KubeletConfigTopologyManagerPolicy { get; set; } + /// + /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType? KubeletDiskType { get; set; } + /// The OS configuration of Linux agent nodes. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ILinuxOSConfig LinuxOSConfig { get; set; } + /// The size in MB of a swap file that will be created on each node. + int? LinuxOSConfigSwapFileSizeMb { get; set; } + /// Sysctl settings for Linux agent nodes. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + 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). + /// + 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; } + /// 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 + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode? Mode { 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.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels NodeLabel { get; set; } + /// + /// This is of the form: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/publicIPPrefixes/{publicIPPrefixName} + /// + string NodePublicIPPrefixId { get; set; } + /// + /// The taints added to new nodes during node pool create and scale. For example, key=value:NoSchedule. + /// + string[] NodeTaint { get; set; } + /// + /// OS Disk Size in GB to be used to specify the disk size for every machine in the master/agent pool. If you specify 0, it + /// will apply the default osDisk size according to the vmSize specified. + /// + 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). + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType? OSDiskType { get; set; } + /// + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + /// Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get; set; } + /// The operating system type. The default is Linux. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? 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). + /// + 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} + /// + 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 + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState PowerState { get; set; } + /// Tells whether the cluster is Running or Stopped + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode? ScaleDownMode { get; set; } + /// + /// This cannot be specified unless the scaleSetPriority is 'Spot'. If not specified, the default is 'Delete'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy? ScaleSetEvictionPolicy { get; set; } + /// + /// The Virtual Machine Scale Set priority. If not specified, the default is 'Regular'. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority? 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) + /// + float? SpotMaxPrice { get; set; } + /// The tags to be persisted on the agent pool virtual machine scale set. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags Tag { get; set; } + /// The type of Agent Pool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType? Type { get; set; } + /// Settings for upgrading the agentpool + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 + /// + 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 + /// + string VMSize { 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} + /// + string VnetSubnetId { get; set; } + /// Determines the type of workload a node can run. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime? WorkloadRuntime { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.json.cs similarity index 70% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.json.cs index 6b34b913d467..2fe2b89dbb5e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfileProperties.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfileProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterAgentPoolProfileProperties 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.Api20200901.IManagedClusterAgentPoolProfileProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfileProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfileProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAgentPoolProfileProperties(json) : null; } @@ -77,32 +77,47 @@ internal ManagedClusterAgentPoolProfileProperties(Microsoft.Azure.PowerShell.Cmd { return; } - {_upgradeSetting = If( json?.PropertyT("upgradeSettings"), out var __jsonUpgradeSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AgentPoolUpgradeSettings.FromJson(__jsonUpgradeSettings) : UpgradeSetting;} - {_powerState = If( json?.PropertyT("powerState"), out var __jsonPowerState) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerState.FromJson(__jsonPowerState) : PowerState;} + {_upgradeSetting = If( json?.PropertyT("upgradeSettings"), out var __jsonUpgradeSettings) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AgentPoolUpgradeSettings.FromJson(__jsonUpgradeSettings) : UpgradeSetting;} + {_powerState = If( json?.PropertyT("powerState"), out var __jsonPowerState) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerState.FromJson(__jsonPowerState) : PowerState;} + {_kubeletConfig = If( json?.PropertyT("kubeletConfig"), out var __jsonKubeletConfig) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.KubeletConfig.FromJson(__jsonKubeletConfig) : KubeletConfig;} + {_linuxOSConfig = If( json?.PropertyT("linuxOSConfig"), out var __jsonLinuxOSConfig) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.LinuxOSConfig.FromJson(__jsonLinuxOSConfig) : LinuxOSConfig;} + {_creationData = If( json?.PropertyT("creationData"), out var __jsonCreationData) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationData.FromJson(__jsonCreationData) : CreationData;} {_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;} {_vnetSubnetId = If( json?.PropertyT("vnetSubnetID"), out var __jsonVnetSubnetId) ? (string)__jsonVnetSubnetId : (string)VnetSubnetId;} + {_podSubnetId = If( json?.PropertyT("podSubnetID"), out var __jsonPodSubnetId) ? (string)__jsonPodSubnetId : (string)PodSubnetId;} {_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;} {_maxCount = If( json?.PropertyT("maxCount"), out var __jsonMaxCount) ? (int?)__jsonMaxCount : MaxCount;} {_minCount = If( json?.PropertyT("minCount"), out var __jsonMinCount) ? (int?)__jsonMinCount : MinCount;} {_enableAutoScaling = If( json?.PropertyT("enableAutoScaling"), out var __jsonEnableAutoScaling) ? (bool?)__jsonEnableAutoScaling : EnableAutoScaling;} + {_scaleDownMode = If( json?.PropertyT("scaleDownMode"), out var __jsonScaleDownMode) ? (string)__jsonScaleDownMode : (string)ScaleDownMode;} {_type = If( json?.PropertyT("type"), out var __jsonType) ? (string)__jsonType : (string)Type;} {_mode = If( json?.PropertyT("mode"), out var __jsonMode) ? (string)__jsonMode : (string)Mode;} {_orchestratorVersion = If( json?.PropertyT("orchestratorVersion"), out var __jsonOrchestratorVersion) ? (string)__jsonOrchestratorVersion : (string)OrchestratorVersion;} + {_currentOrchestratorVersion = If( json?.PropertyT("currentOrchestratorVersion"), out var __jsonCurrentOrchestratorVersion) ? (string)__jsonCurrentOrchestratorVersion : (string)CurrentOrchestratorVersion;} {_nodeImageVersion = If( json?.PropertyT("nodeImageVersion"), out var __jsonNodeImageVersion) ? (string)__jsonNodeImageVersion : (string)NodeImageVersion;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} {_availabilityZone = If( json?.PropertyT("availabilityZones"), out var __jsonAvailabilityZones) ? If( __jsonAvailabilityZones as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : AvailabilityZone;} {_enableNodePublicIP = If( json?.PropertyT("enableNodePublicIP"), out var __jsonEnableNodePublicIP) ? (bool?)__jsonEnableNodePublicIP : EnableNodePublicIP;} + {_nodePublicIPPrefixId = If( json?.PropertyT("nodePublicIPPrefixID"), out var __jsonNodePublicIPPrefixId) ? (string)__jsonNodePublicIPPrefixId : (string)NodePublicIPPrefixId;} {_scaleSetPriority = If( json?.PropertyT("scaleSetPriority"), out var __jsonScaleSetPriority) ? (string)__jsonScaleSetPriority : (string)ScaleSetPriority;} {_scaleSetEvictionPolicy = If( json?.PropertyT("scaleSetEvictionPolicy"), out var __jsonScaleSetEvictionPolicy) ? (string)__jsonScaleSetEvictionPolicy : (string)ScaleSetEvictionPolicy;} {_spotMaxPrice = If( json?.PropertyT("spotMaxPrice"), out var __jsonSpotMaxPrice) ? (float?)__jsonSpotMaxPrice : SpotMaxPrice;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTags.FromJson(__jsonTags) : Tag;} - {_nodeLabel = If( json?.PropertyT("nodeLabels"), out var __jsonNodeLabels) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabels.FromJson(__jsonNodeLabels) : NodeLabel;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTags.FromJson(__jsonTags) : Tag;} + {_nodeLabel = If( json?.PropertyT("nodeLabels"), out var __jsonNodeLabels) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabels.FromJson(__jsonNodeLabels) : NodeLabel;} {_nodeTaint = If( json?.PropertyT("nodeTaints"), out var __jsonNodeTaints) ? If( __jsonNodeTaints as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(string) (__p is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __o ? (string)(__o.ToString()) : null)) ))() : null : NodeTaint;} {_proximityPlacementGroupId = If( json?.PropertyT("proximityPlacementGroupID"), out var __jsonProximityPlacementGroupId) ? (string)__jsonProximityPlacementGroupId : (string)ProximityPlacementGroupId;} + {_enableEncryptionAtHost = If( json?.PropertyT("enableEncryptionAtHost"), out var __jsonEnableEncryptionAtHost) ? (bool?)__jsonEnableEncryptionAtHost : EnableEncryptionAtHost;} + {_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;} + {_hostGroupId = If( json?.PropertyT("hostGroupID"), out var __jsonHostGroupId) ? (string)__jsonHostGroupId : (string)HostGroupId;} AfterFromJson(json); } @@ -128,24 +143,33 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro return container; } AddIf( null != this._upgradeSetting ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._upgradeSetting.ToJson(null,serializationMode) : null, "upgradeSettings" ,container.Add ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != this._powerState ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._powerState.ToJson(null,serializationMode) : null, "powerState" ,container.Add ); - } + AddIf( null != this._powerState ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._powerState.ToJson(null,serializationMode) : null, "powerState" ,container.Add ); + 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._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._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 != 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 ); AddIf( null != this._maxCount ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._maxCount) : null, "maxCount" ,container.Add ); AddIf( null != this._minCount ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._minCount) : null, "minCount" ,container.Add ); AddIf( null != this._enableAutoScaling ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableAutoScaling) : null, "enableAutoScaling" ,container.Add ); + AddIf( null != (((object)this._scaleDownMode)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._scaleDownMode.ToString()) : null, "scaleDownMode" ,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 != (((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._orchestratorVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._orchestratorVersion.ToString()) : null, "orchestratorVersion" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._currentOrchestratorVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._currentOrchestratorVersion.ToString()) : null, "currentOrchestratorVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) { AddIf( null != (((object)this._nodeImageVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._nodeImageVersion.ToString()) : null, "nodeImageVersion" ,container.Add ); } @@ -163,6 +187,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro container.Add("availabilityZones",__w); } AddIf( null != this._enableNodePublicIP ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableNodePublicIP) : null, "enableNodePublicIP" ,container.Add ); + AddIf( null != (((object)this._nodePublicIPPrefixId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._nodePublicIPPrefixId.ToString()) : null, "nodePublicIPPrefixID" ,container.Add ); AddIf( null != (((object)this._scaleSetPriority)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._scaleSetPriority.ToString()) : null, "scaleSetPriority" ,container.Add ); AddIf( null != (((object)this._scaleSetEvictionPolicy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._scaleSetEvictionPolicy.ToString()) : null, "scaleSetEvictionPolicy" ,container.Add ); AddIf( null != this._spotMaxPrice ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((float)this._spotMaxPrice) : null, "spotMaxPrice" ,container.Add ); @@ -178,6 +203,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro container.Add("nodeTaints",__r); } AddIf( null != (((object)this._proximityPlacementGroupId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._proximityPlacementGroupId.ToString()) : null, "proximityPlacementGroupID" ,container.Add ); + AddIf( null != this._enableEncryptionAtHost ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableEncryptionAtHost) : null, "enableEncryptionAtHost" ,container.Add ); + 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._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 ); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.PowerShell.cs similarity index 90% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.PowerShell.cs index 16ee6667c3ec..715249997250 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.PowerShell.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Agent pool node labels to be persisted across all nodes in agent pool. + /// The node labels to be persisted across all nodes in agent pool. [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter))] public partial class ManagedClusterAgentPoolProfilePropertiesNodeLabels { @@ -55,29 +55,29 @@ public partial class ManagedClusterAgentPoolProfilePropertiesNodeLabels partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterAgentPoolProfilePropertiesNodeLabels(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterAgentPoolProfilePropertiesNodeLabels(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels 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. @@ -112,7 +112,7 @@ internal ManagedClusterAgentPoolProfilePropertiesNodeLabels(global::System.Colle } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -135,7 +135,7 @@ internal ManagedClusterAgentPoolProfilePropertiesNodeLabels(global::System.Manag /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// Agent pool node labels to be persisted across all nodes in agent pool. + /// The node labels to be persisted across all nodes in agent pool. [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfilePropertiesNodeLabelsTypeConverter))] public partial interface IManagedClusterAgentPoolProfilePropertiesNodeLabels diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.TypeConverter.cs index a6ff15067fa1..86f0a608127d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.cs similarity index 72% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.cs index 78f90973fdf1..389c6954099f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Agent pool node labels to be persisted across all nodes in agent pool. + /// The node labels to be persisted across all nodes in agent pool. public partial class ManagedClusterAgentPoolProfilePropertiesNodeLabels : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabelsInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabelsInternal { /// @@ -21,14 +21,14 @@ public ManagedClusterAgentPoolProfilePropertiesNodeLabels() } } - /// Agent pool node labels to be persisted across all nodes in agent pool. + /// The node labels to be persisted across all nodes in agent pool. public partial interface IManagedClusterAgentPoolProfilePropertiesNodeLabels : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray { } - /// Agent pool node labels to be persisted across all nodes in agent pool. + /// The node labels to be persisted across all nodes in agent pool. internal partial interface IManagedClusterAgentPoolProfilePropertiesNodeLabelsInternal { diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.dictionary.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.dictionary.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.dictionary.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.dictionary.cs index e55b2a2991df..4be4a472b1ec 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.dictionary.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesNodeLabels source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesNodeLabels source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.json.cs index 9c5bd50ef577..00a77ef6f49a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesNodeLabels.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesNodeLabels.json.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Agent pool node labels to be persisted across all nodes in agent pool. + /// The node labels to be persisted across all nodes in agent pool. public partial class ManagedClusterAgentPoolProfilePropertiesNodeLabels { @@ -54,13 +54,13 @@ public partial class ManagedClusterAgentPoolProfilePropertiesNodeLabels 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.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesNodeLabels FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesNodeLabels FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAgentPoolProfilePropertiesNodeLabels(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.PowerShell.cs similarity index 90% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.PowerShell.cs index 8b82125660c8..db218af8fe47 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.PowerShell.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. + /// The tags to be persisted on the agent pool virtual machine scale set. [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter))] public partial class ManagedClusterAgentPoolProfilePropertiesTags { @@ -55,29 +55,29 @@ public partial class ManagedClusterAgentPoolProfilePropertiesTags partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterAgentPoolProfilePropertiesTags(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterAgentPoolProfilePropertiesTags(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags 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. @@ -112,7 +112,7 @@ internal ManagedClusterAgentPoolProfilePropertiesTags(global::System.Collections } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -135,7 +135,7 @@ internal ManagedClusterAgentPoolProfilePropertiesTags(global::System.Management. /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. + /// The tags to be persisted on the agent pool virtual machine scale set. [System.ComponentModel.TypeConverter(typeof(ManagedClusterAgentPoolProfilePropertiesTagsTypeConverter))] public partial interface IManagedClusterAgentPoolProfilePropertiesTags diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.TypeConverter.cs index 20b8c5240c6b..c49c0abea67c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.cs similarity index 70% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.cs index ca7f39331d39..6008e797bb00 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. + /// The tags to be persisted on the agent pool virtual machine scale set. public partial class ManagedClusterAgentPoolProfilePropertiesTags : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTagsInternal { /// @@ -21,14 +21,14 @@ public ManagedClusterAgentPoolProfilePropertiesTags() } } - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. + /// The tags to be persisted on the agent pool virtual machine scale set. public partial interface IManagedClusterAgentPoolProfilePropertiesTags : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray { } - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. + /// The tags to be persisted on the agent pool virtual machine scale set. internal partial interface IManagedClusterAgentPoolProfilePropertiesTagsInternal { diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.dictionary.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.dictionary.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.dictionary.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.dictionary.cs index 95d03edb8d7b..c6da64ba9b9b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.dictionary.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfilePropertiesTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfilePropertiesTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.json.cs index 107b466160f9..00b4648d3c75 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAgentPoolProfilePropertiesTags.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAgentPoolProfilePropertiesTags.json.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Agent pool tags to be persisted on the agent pool virtual machine scale set. + /// The tags to be persisted on the agent pool virtual machine scale set. public partial class ManagedClusterAgentPoolProfilePropertiesTags { @@ -54,13 +54,13 @@ public partial class ManagedClusterAgentPoolProfilePropertiesTags 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.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfilePropertiesTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfilePropertiesTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAgentPoolProfilePropertiesTags(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.PowerShell.cs similarity index 68% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.PowerShell.cs index ea959c20ce30..083a6952fc4c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterApiServerAccessProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterApiServerAccessProfile(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterApiServerAccessProfile(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile 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. @@ -107,17 +107,29 @@ internal ManagedClusterApiServerAccessProfile(global::System.Collections.IDictio // actually deserialize if (content.Contains("AuthorizedIPRange")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)this).AuthorizedIPRange = (string[]) content.GetValueForProperty("AuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)this).AuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).AuthorizedIPRange = (string[]) content.GetValueForProperty("AuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).AuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("EnablePrivateCluster")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateCluster = (bool?) content.GetValueForProperty("EnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateCluster = (bool?) content.GetValueForProperty("EnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).PrivateDnsZone = (string) content.GetValueForProperty("PrivateDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).PrivateDnsZone, global::System.Convert.ToString); + } + if (content.Contains("EnablePrivateClusterPublicFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateClusterPublicFqdn = (bool?) content.GetValueForProperty("EnablePrivateClusterPublicFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateClusterPublicFqdn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisableRunCommand")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).DisableRunCommand = (bool?) content.GetValueForProperty("DisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).DisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } 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. @@ -132,11 +144,23 @@ internal ManagedClusterApiServerAccessProfile(global::System.Management.Automati // actually deserialize if (content.Contains("AuthorizedIPRange")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)this).AuthorizedIPRange = (string[]) content.GetValueForProperty("AuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)this).AuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).AuthorizedIPRange = (string[]) content.GetValueForProperty("AuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).AuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("EnablePrivateCluster")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateCluster = (bool?) content.GetValueForProperty("EnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateCluster = (bool?) content.GetValueForProperty("EnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PrivateDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).PrivateDnsZone = (string) content.GetValueForProperty("PrivateDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).PrivateDnsZone, global::System.Convert.ToString); + } + if (content.Contains("EnablePrivateClusterPublicFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateClusterPublicFqdn = (bool?) content.GetValueForProperty("EnablePrivateClusterPublicFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).EnablePrivateClusterPublicFqdn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DisableRunCommand")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).DisableRunCommand = (bool?) content.GetValueForProperty("DisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)this).DisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.TypeConverter.cs index 6c15b9dd3633..206552fc9f96 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.cs new file mode 100644 index 000000000000..a715eb37a24c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Access profile for managed cluster API server. + public partial class ManagedClusterApiServerAccessProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal + { + + /// Backing field for property. + private string[] _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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string[] AuthorizedIPRange { get => this._authorizedIPRange; set => this._authorizedIPRange = value; } + + /// Backing field for property. + private bool? _disableRunCommand; + + /// Whether to disable run command for the cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? DisableRunCommand { get => this._disableRunCommand; set => this._disableRunCommand = value; } + + /// Backing field for property. + private bool? _enablePrivateCluster; + + /// + /// 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; } + + /// Backing field for property. + private bool? _enablePrivateClusterPublicFqdn; + + /// Whether to create additional public FQDN for private cluster or not. + [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 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). + /// 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; } + + /// Creates an new instance. + public ManagedClusterApiServerAccessProfile() + { + + } + } + /// Access profile for managed cluster API server. + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"authorizedIPRanges", + PossibleTypes = new [] { typeof(string) })] + string[] AuthorizedIPRange { get; set; } + /// Whether to disable run command for the cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to disable run command for the cluster or not.", + SerializedName = @"disableRunCommand", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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; } + /// Whether to create additional public FQDN for private cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to create additional public FQDN for private cluster or not.", + SerializedName = @"enablePrivateClusterPublicFQDN", + 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). + /// Allowed values are 'system' and 'none'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + SerializedName = @"privateDNSZone", + PossibleTypes = new [] { typeof(string) })] + string PrivateDnsZone { get; set; } + + } + /// Access profile for managed cluster API server. + 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). + /// + string[] 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). + /// + 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). + /// Allowed values are 'system' and 'none'. + /// + string PrivateDnsZone { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.json.cs similarity index 81% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.json.cs index 03b4e8780843..e698d8a9569d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterApiServerAccessProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterApiServerAccessProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterApiServerAccessProfile 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.Api20200901.IManagedClusterApiServerAccessProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterApiServerAccessProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterApiServerAccessProfile(json) : null; } @@ -79,6 +79,9 @@ internal ManagedClusterApiServerAccessProfile(Microsoft.Azure.PowerShell.Cmdlets } {_authorizedIPRange = If( json?.PropertyT("authorizedIPRanges"), out var __jsonAuthorizedIPRanges) ? If( __jsonAuthorizedIPRanges as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : AuthorizedIPRange;} {_enablePrivateCluster = If( json?.PropertyT("enablePrivateCluster"), out var __jsonEnablePrivateCluster) ? (bool?)__jsonEnablePrivateCluster : EnablePrivateCluster;} + {_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;} AfterFromJson(json); } @@ -112,6 +115,9 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro container.Add("authorizedIPRanges",__w); } AddIf( null != this._enablePrivateCluster ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enablePrivateCluster) : null, "enablePrivateCluster" ,container.Add ); + 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 ); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.PowerShell.cs new file mode 100644 index 000000000000..af93d52f792f --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Auto upgrade profile for a managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAutoUpgradeProfileTypeConverter))] + public partial class ManagedClusterAutoUpgradeProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterAutoUpgradeProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterAutoUpgradeProfile(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.Api20230201.IManagedClusterAutoUpgradeProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterAutoUpgradeProfile(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.Api20230201.IManagedClusterAutoUpgradeProfile 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 ManagedClusterAutoUpgradeProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("UpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfileInternal)this).UpgradeChannel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel?) content.GetValueForProperty("UpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfileInternal)this).UpgradeChannel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel.CreateFrom); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterAutoUpgradeProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("UpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfileInternal)this).UpgradeChannel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel?) content.GetValueForProperty("UpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfileInternal)this).UpgradeChannel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel.CreateFrom); + } + 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(); + } + /// Auto upgrade profile for a managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAutoUpgradeProfileTypeConverter))] + public partial interface IManagedClusterAutoUpgradeProfile + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.TypeConverter.cs new file mode 100644 index 000000000000..9f74f4c1e0d5 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterAutoUpgradeProfileTypeConverter : 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.Api20230201.IManagedClusterAutoUpgradeProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterAutoUpgradeProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterAutoUpgradeProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterAutoUpgradeProfile.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.cs new file mode 100644 index 000000000000..7155c7ecf2f2 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Auto upgrade profile for a managed cluster. + public partial class ManagedClusterAutoUpgradeProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfileInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel? _upgradeChannel; + + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel? UpgradeChannel { get => this._upgradeChannel; set => this._upgradeChannel = value; } + + /// Creates an new instance. + public ManagedClusterAutoUpgradeProfile() + { + + } + } + /// Auto upgrade profile for a managed cluster. + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel? UpgradeChannel { get; set; } + + } + /// Auto upgrade profile for a managed cluster. + 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). + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel? UpgradeChannel { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.json.cs new file mode 100644 index 000000000000..29cf8ca9dc46 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAutoUpgradeProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Auto upgrade profile for a managed cluster. + public partial class ManagedClusterAutoUpgradeProfile + { + + /// + /// 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.Api20230201.IManagedClusterAutoUpgradeProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAutoUpgradeProfile(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 ManagedClusterAutoUpgradeProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_upgradeChannel = If( json?.PropertyT("upgradeChannel"), out var __jsonUpgradeChannel) ? (string)__jsonUpgradeChannel : (string)UpgradeChannel;} + 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._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 ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.PowerShell.cs new file mode 100644 index 000000000000..01b701c47a18 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Azure Monitor addon profiles for monitoring the managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAzureMonitorProfileTypeConverter))] + public partial class ManagedClusterAzureMonitorProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterAzureMonitorProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterAzureMonitorProfile(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.Api20230201.IManagedClusterAzureMonitorProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterAzureMonitorProfile(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.Api20230201.IManagedClusterAzureMonitorProfile 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 ManagedClusterAzureMonitorProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("MetricKubeStateMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).MetricKubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("MetricKubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).MetricKubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("MetricEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).MetricEnabled = (bool) content.GetValueForProperty("MetricEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).MetricEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeStateMetricLabelsAllowlist")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); + } + if (content.Contains("KubeStateMetricAnnotationsAllowList")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).KubeStateMetricAnnotationsAllowList, 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 ManagedClusterAzureMonitorProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Metric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).Metric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics) content.GetValueForProperty("Metric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).Metric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("MetricKubeStateMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).MetricKubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("MetricKubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).MetricKubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("MetricEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).MetricEnabled = (bool) content.GetValueForProperty("MetricEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).MetricEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeStateMetricLabelsAllowlist")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); + } + if (content.Contains("KubeStateMetricAnnotationsAllowList")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)this).KubeStateMetricAnnotationsAllowList, 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(); + } + /// Azure Monitor addon profiles for monitoring the managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAzureMonitorProfileTypeConverter))] + public partial interface IManagedClusterAzureMonitorProfile + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.TypeConverter.cs new file mode 100644 index 000000000000..7fd7b924eac3 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterAzureMonitorProfileTypeConverter : 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.Api20230201.IManagedClusterAzureMonitorProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterAzureMonitorProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterAzureMonitorProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterAzureMonitorProfile.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.cs new file mode 100644 index 000000000000..43d00349e61a --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Azure Monitor addon profiles for monitoring the managed cluster. + public partial class ManagedClusterAzureMonitorProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal + { + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeStateMetricAnnotationsAllowList { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).KubeStateMetricAnnotationsAllowList; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).KubeStateMetricAnnotationsAllowList = value ?? null; } + + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeStateMetricLabelsAllowlist { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).KubeStateMetricLabelsAllowlist; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).KubeStateMetricLabelsAllowlist = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics _metric; + + /// + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + /// metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus + /// for an overview. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics Metric { get => (this._metric = this._metric ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetrics()); set => this._metric = value; } + + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? MetricEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).Enabled = value ?? default(bool); } + + /// Internal Acessors for Metric + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal.Metric { get => (this._metric = this._metric ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetrics()); set { {_metric = value;} } } + + /// Internal Acessors for MetricKubeStateMetric + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal.MetricKubeStateMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).KubeStateMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)Metric).KubeStateMetric = value; } + + /// Creates an new instance. + public ManagedClusterAzureMonitorProfile() + { + + } + } + /// Azure Monitor addon profiles for monitoring the managed cluster. + public partial interface IManagedClusterAzureMonitorProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"metricAnnotationsAllowList", + PossibleTypes = new [] { typeof(string) })] + string KubeStateMetricAnnotationsAllowList { get; set; } + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only resource name and namespace labels.", + SerializedName = @"metricLabelsAllowlist", + PossibleTypes = new [] { typeof(string) })] + string KubeStateMetricLabelsAllowlist { get; set; } + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MetricEnabled { get; set; } + + } + /// Azure Monitor addon profiles for monitoring the managed cluster. + internal partial interface IManagedClusterAzureMonitorProfileInternal + + { + /// + /// 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. + /// + string KubeStateMetricAnnotationsAllowList { get; set; } + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + string KubeStateMetricLabelsAllowlist { get; set; } + /// + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + /// metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus + /// for an overview. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics Metric { get; set; } + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + bool? MetricEnabled { get; set; } + /// + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics MetricKubeStateMetric { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.json.cs new file mode 100644 index 000000000000..4aeaac9e70a3 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Azure Monitor addon profiles for monitoring the managed cluster. + public partial class ManagedClusterAzureMonitorProfile + { + + /// + /// 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.Api20230201.IManagedClusterAzureMonitorProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAzureMonitorProfile(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 ManagedClusterAzureMonitorProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_metric = If( json?.PropertyT("metrics"), out var __jsonMetrics) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetrics.FromJson(__jsonMetrics) : Metric;} + 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._metric ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._metric.ToJson(null,serializationMode) : null, "metrics" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.PowerShell.cs new file mode 100644 index 000000000000..251e5b5b5ae5 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.PowerShell.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + /// + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter))] + public partial class ManagedClusterAzureMonitorProfileKubeStateMetrics + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterAzureMonitorProfileKubeStateMetrics(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.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterAzureMonitorProfileKubeStateMetrics(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.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics 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 ManagedClusterAzureMonitorProfileKubeStateMetrics(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MetricLabelsAllowlist")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)this).MetricLabelsAllowlist = (string) content.GetValueForProperty("MetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)this).MetricLabelsAllowlist, global::System.Convert.ToString); + } + if (content.Contains("MetricAnnotationsAllowList")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)this).MetricAnnotationsAllowList = (string) content.GetValueForProperty("MetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)this).MetricAnnotationsAllowList, 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 ManagedClusterAzureMonitorProfileKubeStateMetrics(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("MetricLabelsAllowlist")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)this).MetricLabelsAllowlist = (string) content.GetValueForProperty("MetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)this).MetricLabelsAllowlist, global::System.Convert.ToString); + } + if (content.Contains("MetricAnnotationsAllowList")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)this).MetricAnnotationsAllowList = (string) content.GetValueForProperty("MetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)this).MetricAnnotationsAllowList, 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(); + } + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter))] + public partial interface IManagedClusterAzureMonitorProfileKubeStateMetrics + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.TypeConverter.cs new file mode 100644 index 000000000000..d1b5c4ec6fd1 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter : 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.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterAzureMonitorProfileKubeStateMetrics.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterAzureMonitorProfileKubeStateMetrics.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterAzureMonitorProfileKubeStateMetrics.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.cs new file mode 100644 index 000000000000..8cff2ef0e390 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + /// + public partial class ManagedClusterAzureMonitorProfileKubeStateMetrics : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal + { + + /// Backing field for property. + private string _metricAnnotationsAllowList; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string MetricAnnotationsAllowList { get => this._metricAnnotationsAllowList; set => this._metricAnnotationsAllowList = value; } + + /// Backing field for property. + private string _metricLabelsAllowlist; + + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string MetricLabelsAllowlist { get => this._metricLabelsAllowlist; set => this._metricLabelsAllowlist = value; } + + /// + /// Creates an new instance. + /// + public ManagedClusterAzureMonitorProfileKubeStateMetrics() + { + + } + } + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + public partial interface IManagedClusterAzureMonitorProfileKubeStateMetrics : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"metricAnnotationsAllowList", + PossibleTypes = new [] { typeof(string) })] + string MetricAnnotationsAllowList { get; set; } + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only resource name and namespace labels.", + SerializedName = @"metricLabelsAllowlist", + PossibleTypes = new [] { typeof(string) })] + string MetricLabelsAllowlist { get; set; } + + } + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + internal partial interface IManagedClusterAzureMonitorProfileKubeStateMetricsInternal + + { + /// + /// 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. + /// + string MetricAnnotationsAllowList { get; set; } + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + string MetricLabelsAllowlist { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.json.cs new file mode 100644 index 000000000000..4867401cc2a5 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileKubeStateMetrics.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + /// + public partial class ManagedClusterAzureMonitorProfileKubeStateMetrics + { + + /// + /// 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.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAzureMonitorProfileKubeStateMetrics(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 ManagedClusterAzureMonitorProfileKubeStateMetrics(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_metricLabelsAllowlist = If( json?.PropertyT("metricLabelsAllowlist"), out var __jsonMetricLabelsAllowlist) ? (string)__jsonMetricLabelsAllowlist : (string)MetricLabelsAllowlist;} + {_metricAnnotationsAllowList = If( json?.PropertyT("metricAnnotationsAllowList"), out var __jsonMetricAnnotationsAllowList) ? (string)__jsonMetricAnnotationsAllowList : (string)MetricAnnotationsAllowList;} + 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._metricLabelsAllowlist)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._metricLabelsAllowlist.ToString()) : null, "metricLabelsAllowlist" ,container.Add ); + AddIf( null != (((object)this._metricAnnotationsAllowList)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._metricAnnotationsAllowList.ToString()) : null, "metricAnnotationsAllowList" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.PowerShell.cs new file mode 100644 index 000000000000..b14573a083d7 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.PowerShell.cs @@ -0,0 +1,179 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + /// metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus + /// for an overview. + /// + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAzureMonitorProfileMetricsTypeConverter))] + public partial class ManagedClusterAzureMonitorProfileMetrics + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterAzureMonitorProfileMetrics DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterAzureMonitorProfileMetrics(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.Api20230201.IManagedClusterAzureMonitorProfileMetrics DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterAzureMonitorProfileMetrics(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.Api20230201.IManagedClusterAzureMonitorProfileMetrics 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 ManagedClusterAzureMonitorProfileMetrics(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("KubeStateMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("KubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeStateMetricLabelsAllowlist")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); + } + if (content.Contains("KubeStateMetricAnnotationsAllowList")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetricAnnotationsAllowList, 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 ManagedClusterAzureMonitorProfileMetrics(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("KubeStateMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("KubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("Enabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeStateMetricLabelsAllowlist")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); + } + if (content.Contains("KubeStateMetricAnnotationsAllowList")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal)this).KubeStateMetricAnnotationsAllowList, 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(); + } + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + /// metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus + /// for an overview. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterAzureMonitorProfileMetricsTypeConverter))] + public partial interface IManagedClusterAzureMonitorProfileMetrics + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.TypeConverter.cs new file mode 100644 index 000000000000..fd89b321bfbc --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterAzureMonitorProfileMetricsTypeConverter : 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.Api20230201.IManagedClusterAzureMonitorProfileMetrics ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterAzureMonitorProfileMetrics.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterAzureMonitorProfileMetrics.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterAzureMonitorProfileMetrics.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.cs new file mode 100644 index 000000000000..1df264ee3c44 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + /// metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus + /// for an overview. + /// + public partial class ManagedClusterAzureMonitorProfileMetrics : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal + { + + /// Backing field for property. + private bool _enabled; + + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + [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.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics _kubeStateMetric; + + /// + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics KubeStateMetric { get => (this._kubeStateMetric = this._kubeStateMetric ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetrics()); set => this._kubeStateMetric = 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeStateMetricAnnotationsAllowList { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)KubeStateMetric).MetricAnnotationsAllowList; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)KubeStateMetric).MetricAnnotationsAllowList = value ?? null; } + + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeStateMetricLabelsAllowlist { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)KubeStateMetric).MetricLabelsAllowlist; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetricsInternal)KubeStateMetric).MetricLabelsAllowlist = value ?? null; } + + /// Internal Acessors for KubeStateMetric + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetricsInternal.KubeStateMetric { get => (this._kubeStateMetric = this._kubeStateMetric ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetrics()); set { {_kubeStateMetric = value;} } } + + /// + /// Creates an new instance. + /// + public ManagedClusterAzureMonitorProfileMetrics() + { + + } + } + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + /// metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus + /// for an overview. + public partial interface IManagedClusterAzureMonitorProfileMetrics : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool Enabled { 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"metricAnnotationsAllowList", + PossibleTypes = new [] { typeof(string) })] + string KubeStateMetricAnnotationsAllowList { get; set; } + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only resource name and namespace labels.", + SerializedName = @"metricLabelsAllowlist", + PossibleTypes = new [] { typeof(string) })] + string KubeStateMetricLabelsAllowlist { get; set; } + + } + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + /// metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus + /// for an overview. + internal partial interface IManagedClusterAzureMonitorProfileMetricsInternal + + { + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + bool Enabled { get; set; } + /// + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics KubeStateMetric { 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. + /// + string KubeStateMetricAnnotationsAllowList { get; set; } + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + string KubeStateMetricLabelsAllowlist { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.json.cs new file mode 100644 index 000000000000..3233e3120b10 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterAzureMonitorProfileMetrics.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + /// metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus + /// for an overview. + /// + public partial class ManagedClusterAzureMonitorProfileMetrics + { + + /// + /// 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.Api20230201.IManagedClusterAzureMonitorProfileMetrics. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterAzureMonitorProfileMetrics(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 ManagedClusterAzureMonitorProfileMetrics(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_kubeStateMetric = If( json?.PropertyT("kubeStateMetrics"), out var __jsonKubeStateMetrics) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetrics.FromJson(__jsonKubeStateMetrics) : KubeStateMetric;} + {_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._kubeStateMetric ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._kubeStateMetric.ToJson(null,serializationMode) : null, "kubeStateMetrics" ,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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.PowerShell.cs new file mode 100644 index 000000000000..acaf63a704ee --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.PowerShell.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Cluster HTTP proxy configuration. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterHttpProxyConfigTypeConverter))] + public partial class ManagedClusterHttpProxyConfig + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterHttpProxyConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterHttpProxyConfig(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.Api20230201.IManagedClusterHttpProxyConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterHttpProxyConfig(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.Api20230201.IManagedClusterHttpProxyConfig 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 ManagedClusterHttpProxyConfig(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HttpProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).HttpProxy = (string) content.GetValueForProperty("HttpProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).HttpProxy, global::System.Convert.ToString); + } + if (content.Contains("HttpsProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).HttpsProxy = (string) content.GetValueForProperty("HttpsProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).HttpsProxy, global::System.Convert.ToString); + } + if (content.Contains("NoProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).NoProxy = (string[]) content.GetValueForProperty("NoProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).NoProxy, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TrustedCa")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).TrustedCa = (string) content.GetValueForProperty("TrustedCa",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).TrustedCa, 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 ManagedClusterHttpProxyConfig(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("HttpProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).HttpProxy = (string) content.GetValueForProperty("HttpProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).HttpProxy, global::System.Convert.ToString); + } + if (content.Contains("HttpsProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).HttpsProxy = (string) content.GetValueForProperty("HttpsProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).HttpsProxy, global::System.Convert.ToString); + } + if (content.Contains("NoProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).NoProxy = (string[]) content.GetValueForProperty("NoProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).NoProxy, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("TrustedCa")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).TrustedCa = (string) content.GetValueForProperty("TrustedCa",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)this).TrustedCa, 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(); + } + /// Cluster HTTP proxy configuration. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterHttpProxyConfigTypeConverter))] + public partial interface IManagedClusterHttpProxyConfig + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.TypeConverter.cs similarity index 85% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.TypeConverter.cs index d840da855f7f..efecd3882bea 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.TypeConverter.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { 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 ContainerServiceVMDiagnosticsTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class ManagedClusterHttpProxyConfigTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class ContainerServiceVMDiagnosticsTypeConverter : global::System 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.Api20200901.IContainerServiceVMDiagnostics ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig).IsAssignableFrom(type)) { return sourceValue; } try { - return ContainerServiceVMDiagnostics.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return ManagedClusterHttpProxyConfig.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContain } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ContainerServiceVMDiagnostics.DeserializeFromPSObject(sourceValue); + return ManagedClusterHttpProxyConfig.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ContainerServiceVMDiagnostics.DeserializeFromDictionary(sourceValue); + return ManagedClusterHttpProxyConfig.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.cs new file mode 100644 index 000000000000..ec6bca96eb05 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Cluster HTTP proxy configuration. + public partial class ManagedClusterHttpProxyConfig : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal + { + + /// Backing field for property. + private string _httpProxy; + + /// The HTTP proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string HttpProxy { get => this._httpProxy; set => this._httpProxy = value; } + + /// Backing field for property. + private string _httpsProxy; + + /// The HTTPS proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string HttpsProxy { get => this._httpsProxy; set => this._httpsProxy = value; } + + /// Backing field for property. + private string[] _noProxy; + + /// The endpoints that should not go through proxy. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string[] NoProxy { get => this._noProxy; set => this._noProxy = value; } + + /// Backing field for property. + private string _trustedCa; + + /// Alternative CA cert to use for connecting to proxy servers. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string TrustedCa { get => this._trustedCa; set => this._trustedCa = value; } + + /// Creates an new instance. + public ManagedClusterHttpProxyConfig() + { + + } + } + /// Cluster HTTP proxy configuration. + public partial interface IManagedClusterHttpProxyConfig : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The HTTP proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The HTTP proxy server endpoint to use.", + SerializedName = @"httpProxy", + PossibleTypes = new [] { typeof(string) })] + string HttpProxy { get; set; } + /// The HTTPS proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The HTTPS proxy server endpoint to use.", + SerializedName = @"httpsProxy", + PossibleTypes = new [] { typeof(string) })] + string HttpsProxy { get; set; } + /// The endpoints that should not go through proxy. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The endpoints that should not go through proxy.", + SerializedName = @"noProxy", + PossibleTypes = new [] { typeof(string) })] + string[] NoProxy { get; set; } + /// Alternative CA cert to use for connecting to proxy servers. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Alternative CA cert to use for connecting to proxy servers.", + SerializedName = @"trustedCa", + PossibleTypes = new [] { typeof(string) })] + string TrustedCa { get; set; } + + } + /// Cluster HTTP proxy configuration. + internal partial interface IManagedClusterHttpProxyConfigInternal + + { + /// The HTTP proxy server endpoint to use. + string HttpProxy { get; set; } + /// The HTTPS proxy server endpoint to use. + string HttpsProxy { get; set; } + /// The endpoints that should not go through proxy. + string[] NoProxy { get; set; } + /// Alternative CA cert to use for connecting to proxy servers. + string TrustedCa { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.json.cs new file mode 100644 index 000000000000..15bab8b88803 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterHttpProxyConfig.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Cluster HTTP proxy configuration. + public partial class ManagedClusterHttpProxyConfig + { + + /// + /// 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.Api20230201.IManagedClusterHttpProxyConfig. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterHttpProxyConfig(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 ManagedClusterHttpProxyConfig(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_httpProxy = If( json?.PropertyT("httpProxy"), out var __jsonHttpProxy) ? (string)__jsonHttpProxy : (string)HttpProxy;} + {_httpsProxy = If( json?.PropertyT("httpsProxy"), out var __jsonHttpsProxy) ? (string)__jsonHttpsProxy : (string)HttpsProxy;} + {_noProxy = If( json?.PropertyT("noProxy"), out var __jsonNoProxy) ? If( __jsonNoProxy as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(string) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString __t ? (string)(__t.ToString()) : null)) ))() : null : NoProxy;} + {_trustedCa = If( json?.PropertyT("trustedCa"), out var __jsonTrustedCa) ? (string)__jsonTrustedCa : (string)TrustedCa;} + 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._httpProxy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._httpProxy.ToString()) : null, "httpProxy" ,container.Add ); + AddIf( null != (((object)this._httpsProxy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._httpsProxy.ToString()) : null, "httpsProxy" ,container.Add ); + if (null != this._noProxy) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._noProxy ) + { + 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("noProxy",__w); + } + AddIf( null != (((object)this._trustedCa)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._trustedCa.ToString()) : null, "trustedCa" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.PowerShell.cs similarity index 82% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.PowerShell.cs index 3f345bc2d2c7..0b3d75f97d71 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ManagedClusterIdentity partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IManagedClusterIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterIdentity(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.Api20200901.IManagedClusterIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterIdentity(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity 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. @@ -103,25 +103,25 @@ internal ManagedClusterIdentity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType.CreateFrom); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.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. @@ -136,19 +136,19 @@ internal ManagedClusterIdentity(global::System.Management.Automation.PSObject co // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("TenantId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).TenantId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).TenantId = (string) content.GetValueForProperty("TenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).TenantId, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).Type = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType?) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).Type, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType.CreateFrom); } if (content.Contains("UserAssignedIdentity")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal)this).UserAssignedIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentityUserAssignedIdentitiesTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.TypeConverter.cs index 410f8c49ab79..4b13dd7602ea 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.cs similarity index 60% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.cs index 0eb34d172217..8eca1df5e76a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.cs @@ -3,21 +3,21 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Identity for the managed cluster. public partial class ManagedClusterIdentity : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal { /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Internal Acessors for TenantId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityInternal.TenantId { get => this._tenantId; set { {_tenantId = value;} } } /// Backing field for property. private string _principalId; @@ -41,22 +41,19 @@ public partial class ManagedClusterIdentity : private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? _type; /// - /// The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master - /// components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI - /// for the managed cluster, service principal will be used instead. + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? Type { get => this._type; set => this._type = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities _userAssignedIdentity; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities _userAssignedIdentity; /// - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// 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.Api20200901.IManagedClusterIdentityUserAssignedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentities()); set => this._userAssignedIdentity = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities UserAssignedIdentity { get => (this._userAssignedIdentity = this._userAssignedIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentityUserAssignedIdentities()); set => this._userAssignedIdentity = value; } /// Creates an new instance. public ManagedClusterIdentity() @@ -89,28 +86,25 @@ public partial interface IManagedClusterIdentity : PossibleTypes = new [] { typeof(string) })] string TenantId { get; } /// - /// The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master - /// components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI - /// for the managed cluster, service principal will be used instead. + /// 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, ReadOnly = false, - Description = @"The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI for the managed cluster, service principal will be used instead.", + Description = @"For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity).", SerializedName = @"type", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? Type { get; set; } /// - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// 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, ReadOnly = false, - Description = @"The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + Description = @"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.Api20200901.IManagedClusterIdentityUserAssignedIdentities) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } } /// Identity for the managed cluster. @@ -126,16 +120,13 @@ internal partial interface IManagedClusterIdentityInternal /// string TenantId { get; set; } /// - /// The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master - /// components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI - /// for the managed cluster, service principal will be used instead. + /// For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType? Type { get; set; } /// - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// 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.Api20200901.IManagedClusterIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities UserAssignedIdentity { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.json.cs index f03c7e68a93b..0ca4b5fec754 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentity.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentity.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterIdentity 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.Api20200901.IManagedClusterIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterIdentity(json) : null; } @@ -80,7 +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;} - {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentities.FromJson(__jsonUserAssignedIdentities) : UserAssignedIdentity;} + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentityUserAssignedIdentities.FromJson(__jsonUserAssignedIdentities) : UserAssignedIdentity;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs similarity index 84% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs index 40fa219ab6e4..6bee7097c092 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.PowerShell.cs @@ -3,13 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// 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 @@ -58,29 +57,29 @@ public partial class ManagedClusterIdentityUserAssignedIdentities partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterIdentityUserAssignedIdentities(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterIdentityUserAssignedIdentities(content); } @@ -93,10 +92,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities 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. @@ -115,7 +114,7 @@ internal ManagedClusterIdentityUserAssignedIdentities(global::System.Collections } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -138,8 +137,7 @@ internal ManagedClusterIdentityUserAssignedIdentities(global::System.Management. /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// 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/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.TypeConverter.cs index 64bd3b7a5e48..013ff0be1ee4 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.cs new file mode 100644 index 000000000000..2b65e2e6e5de --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + 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}'. + /// + public partial class ManagedClusterIdentityUserAssignedIdentities : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentitiesInternal + { + + /// + /// Creates an new instance. + /// + public ManagedClusterIdentityUserAssignedIdentities() + { + + } + } + /// 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}'. + internal partial interface IManagedClusterIdentityUserAssignedIdentitiesInternal + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.dictionary.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.dictionary.cs similarity index 78% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.dictionary.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.dictionary.cs index d6b0d3baaaf4..a22210ed7589 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.dictionary.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; public partial class ManagedClusterIdentityUserAssignedIdentities : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + 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; } + 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; } + 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.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue 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.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentityUserAssignedIdentities source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterIdentityUserAssignedIdentities source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.json.cs similarity index 89% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.json.cs index 9d8ee4886658..b7feada1b222 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentities.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterIdentityUserAssignedIdentities.json.cs @@ -3,13 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// - /// The user identity associated with the managed cluster. This identity will be used in control plane and only one user assigned - /// identity is allowed. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + /// The keys must be ARM resource IDs in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. /// public partial class ManagedClusterIdentityUserAssignedIdentities { @@ -57,13 +56,13 @@ public partial class ManagedClusterIdentityUserAssignedIdentities 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.Api20200901.IManagedClusterIdentityUserAssignedIdentities. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentities FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterIdentityUserAssignedIdentities FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterIdentityUserAssignedIdentities(json) : null; } @@ -82,7 +81,7 @@ internal ManagedClusterIdentityUserAssignedIdentities(Microsoft.Azure.PowerShell { 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.Api20200901.ManagedClusterIdentityUserAssignedIdentitiesValue.FromJson(j) ,exclusions ); + 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.Api20230201.ManagedServiceIdentityUserAssignedIdentitiesValue.FromJson(j) ,exclusions ); AfterFromJson(json); } @@ -107,7 +106,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.PowerShell.cs similarity index 84% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.PowerShell.cs index c791d2e4a554..776fb39299d2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ManagedClusterListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IManagedClusterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterListResult(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.Api20200901.IManagedClusterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterListResult(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResult 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. @@ -103,17 +103,17 @@ internal ManagedClusterListResult(global::System.Collections.IDictionary content // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResultInternal)this).NextLink, 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. @@ -128,11 +128,11 @@ internal ManagedClusterListResult(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterTypeConverter.ConvertFrom)); } if (content.Contains("NextLink")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResultInternal)this).NextLink, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResultInternal)this).NextLink, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.TypeConverter.cs index 125d441e34c7..157263bfa03b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.cs similarity index 84% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.cs index 9d573703d995..bd9d57fd9a59 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.cs @@ -3,18 +3,18 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// The response from the List Managed Clusters operation. public partial class ManagedClusterListResult : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResult, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResultInternal { /// Internal Acessors for NextLink - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } /// Backing field for property. private string _nextLink; @@ -24,11 +24,11 @@ public partial class ManagedClusterListResult : public string NextLink { get => this._nextLink; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster[] _value; /// The list of managed clusters. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public ManagedClusterListResult() @@ -54,8 +54,8 @@ public partial interface IManagedClusterListResult : ReadOnly = false, Description = @"The list of managed clusters.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster[] Value { get; set; } } /// The response from the List Managed Clusters operation. @@ -65,7 +65,7 @@ internal partial interface IManagedClusterListResultInternal /// The URL to get the next set of managed cluster results. string NextLink { get; set; } /// The list of managed clusters. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster[] Value { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.json.cs index a424dd598003..39e4069a47e0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterListResult.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterListResult 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.Api20200901.IManagedClusterListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterListResult(json) : null; } @@ -77,7 +77,7 @@ internal ManagedClusterListResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime { 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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedCluster) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedCluster.FromJson(__u) )) ))() : null : Value;} + {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedCluster) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedCluster.FromJson(__u) )) ))() : null : Value;} {_nextLink = If( json?.PropertyT("nextLink"), out var __jsonNextLink) ? (string)__jsonNextLink : (string)NextLink;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.PowerShell.cs similarity index 66% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.PowerShell.cs index d12b259071bc..1a584203613c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterLoadBalancerProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterLoadBalancerProfile(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterLoadBalancerProfile(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile 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. @@ -107,45 +107,53 @@ internal ManagedClusterLoadBalancerProfile(global::System.Collections.IDictionar // actually deserialize if (content.Contains("ManagedOutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("ManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("ManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); } if (content.Contains("OutboundIPPrefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("OutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("OutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); } if (content.Contains("OutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("OutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("OutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); } if (content.Contains("EffectiveOutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).EffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("EffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).EffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).EffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("EffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).EffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } if (content.Contains("AllocatedOutboundPort")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).AllocatedOutboundPort = (int?) content.GetValueForProperty("AllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).AllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).AllocatedOutboundPort = (int?) content.GetValueForProperty("AllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).AllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("IdleTimeoutInMinute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).IdleTimeoutInMinute = (int?) content.GetValueForProperty("IdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).IdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).IdleTimeoutInMinute = (int?) content.GetValueForProperty("IdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).IdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnableMultipleStandardLoadBalancer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).EnableMultipleStandardLoadBalancer = (bool?) content.GetValueForProperty("EnableMultipleStandardLoadBalancer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).EnableMultipleStandardLoadBalancer, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ManagedOutboundIPCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ManagedOutboundIPCountIpv6")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCountIpv6 = (int?) content.GetValueForProperty("ManagedOutboundIPCountIpv6",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCountIpv6, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("OutboundIPPrefixPublicIpprefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } if (content.Contains("OutboundIPPublicIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.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. @@ -160,39 +168,47 @@ internal ManagedClusterLoadBalancerProfile(global::System.Management.Automation. // actually deserialize if (content.Contains("ManagedOutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("ManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs) content.GetValueForProperty("ManagedOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileManagedOutboundIPsTypeConverter.ConvertFrom); } if (content.Contains("OutboundIPPrefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("OutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes) content.GetValueForProperty("OutboundIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefix, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPPrefixesTypeConverter.ConvertFrom); } if (content.Contains("OutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("OutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs) content.GetValueForProperty("OutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIP, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPsTypeConverter.ConvertFrom); } if (content.Contains("EffectiveOutboundIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).EffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("EffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).EffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).EffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("EffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).EffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } if (content.Contains("AllocatedOutboundPort")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).AllocatedOutboundPort = (int?) content.GetValueForProperty("AllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).AllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).AllocatedOutboundPort = (int?) content.GetValueForProperty("AllocatedOutboundPort",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).AllocatedOutboundPort, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("IdleTimeoutInMinute")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).IdleTimeoutInMinute = (int?) content.GetValueForProperty("IdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).IdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).IdleTimeoutInMinute = (int?) content.GetValueForProperty("IdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).IdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("EnableMultipleStandardLoadBalancer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).EnableMultipleStandardLoadBalancer = (bool?) content.GetValueForProperty("EnableMultipleStandardLoadBalancer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).EnableMultipleStandardLoadBalancer, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } if (content.Contains("ManagedOutboundIPCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount = (int?) content.GetValueForProperty("ManagedOutboundIPCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ManagedOutboundIPCountIpv6")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCountIpv6 = (int?) content.GetValueForProperty("ManagedOutboundIPCountIpv6",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).ManagedOutboundIPCountIpv6, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } if (content.Contains("OutboundIPPrefixPublicIpprefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefixPublicIpprefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("OutboundIPPrefixPublicIpprefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPrefixPublicIpprefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } if (content.Contains("OutboundIPPublicIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("OutboundIPPublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal)this).OutboundIPPublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.TypeConverter.cs index 19889c6e07a7..82beee9d6a68 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.cs similarity index 57% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.cs index f195117f4a01..2051179d7a1c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.cs @@ -3,87 +3,101 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Profile of the managed cluster load balancer. public partial class ManagedClusterLoadBalancerProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal { /// Backing field for property. private int? _allocatedOutboundPort; /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default + /// The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default /// value is 0 which results in Azure dynamically allocating ports. /// [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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] _effectiveOutboundIP; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] _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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] EffectiveOutboundIP { get => this._effectiveOutboundIP; set => this._effectiveOutboundIP = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] EffectiveOutboundIP { get => this._effectiveOutboundIP; set => this._effectiveOutboundIP = value; } + + /// Backing field for property. + private bool? _enableMultipleStandardLoadBalancer; + + /// Enable multiple standard load balancers per AKS cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnableMultipleStandardLoadBalancer { get => this._enableMultipleStandardLoadBalancer; set => this._enableMultipleStandardLoadBalancer = value; } /// Backing field for property. private int? _idleTimeoutInMinute; /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 30 minutes. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public int? IdleTimeoutInMinute { get => this._idleTimeoutInMinute; set => this._idleTimeoutInMinute = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs _managedOutboundIP; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs _managedOutboundIP; /// Desired managed outbound IPs for the cluster load balancer. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs ManagedOutboundIP { get => (this._managedOutboundIP = this._managedOutboundIP ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPs()); set => this._managedOutboundIP = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs ManagedOutboundIP { get => (this._managedOutboundIP = this._managedOutboundIP ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileManagedOutboundIPs()); set => this._managedOutboundIP = value; } /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. + /// The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 1. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public int? ManagedOutboundIPCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)ManagedOutboundIP).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)ManagedOutboundIP).Count = value ?? default(int); } + public int? ManagedOutboundIPCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)ManagedOutboundIP).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)ManagedOutboundIP).Count = value ?? default(int); } + + /// + /// The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? ManagedOutboundIPCountIpv6 { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)ManagedOutboundIP).CountIPv6; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)ManagedOutboundIP).CountIPv6 = value ?? default(int); } /// Internal Acessors for ManagedOutboundIP - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal.ManagedOutboundIP { get => (this._managedOutboundIP = this._managedOutboundIP ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPs()); set { {_managedOutboundIP = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal.ManagedOutboundIP { get => (this._managedOutboundIP = this._managedOutboundIP ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileManagedOutboundIPs()); set { {_managedOutboundIP = value;} } } /// Internal Acessors for OutboundIP - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal.OutboundIP { get => (this._outboundIP = this._outboundIP ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPs()); set { {_outboundIP = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal.OutboundIP { get => (this._outboundIP = this._outboundIP ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPs()); set { {_outboundIP = value;} } } /// Internal Acessors for OutboundIPPrefix - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileInternal.OutboundIPPrefix { get => (this._outboundIPPrefix = this._outboundIPPrefix ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixes()); set { {_outboundIPPrefix = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileInternal.OutboundIPPrefix { get => (this._outboundIPPrefix = this._outboundIPPrefix ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPPrefixes()); set { {_outboundIPPrefix = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs _outboundIP; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs _outboundIP; /// Desired outbound IP resources for the cluster load balancer. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs OutboundIP { get => (this._outboundIP = this._outboundIP ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPs()); set => this._outboundIP = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs OutboundIP { get => (this._outboundIP = this._outboundIP ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPs()); set => this._outboundIP = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes _outboundIPPrefix; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes _outboundIPPrefix; /// Desired outbound IP Prefix resources for the cluster load balancer. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes OutboundIPPrefix { get => (this._outboundIPPrefix = this._outboundIPPrefix ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixes()); set => this._outboundIPPrefix = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes OutboundIPPrefix { get => (this._outboundIPPrefix = this._outboundIPPrefix ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPPrefixes()); set => this._outboundIPPrefix = value; } /// A list of public IP prefix resources. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)OutboundIPPrefix).PublicIPPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)OutboundIPPrefix).PublicIPPrefix = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] OutboundIPPrefixPublicIpprefix { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)OutboundIPPrefix).PublicIPPrefix; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)OutboundIPPrefix).PublicIPPrefix = value ?? null /* arrayOf */; } /// A list of public IP resources. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPsInternal)OutboundIP).PublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPsInternal)OutboundIP).PublicIP = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] OutboundIPPublicIP { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPsInternal)OutboundIP).PublicIP; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPsInternal)OutboundIP).PublicIP = value ?? null /* arrayOf */; } /// Creates an new instance. public ManagedClusterLoadBalancerProfile() @@ -96,13 +110,13 @@ public partial interface IManagedClusterLoadBalancerProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default + /// The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default /// value is 0 which results in Azure dynamically allocating ports. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports.", + Description = @"The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default value is 0 which results in Azure dynamically allocating ports.", SerializedName = @"allocatedOutboundPorts", PossibleTypes = new [] { typeof(int) })] int? AllocatedOutboundPort { get; set; } @@ -112,46 +126,65 @@ public partial interface IManagedClusterLoadBalancerProfile : ReadOnly = false, Description = @"The effective outbound IP resources of the cluster load balancer.", SerializedName = @"effectiveOutboundIPs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] EffectiveOutboundIP { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] EffectiveOutboundIP { get; set; } + /// Enable multiple standard load balancers per AKS cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Enable multiple standard load balancers per AKS cluster or not.", + SerializedName = @"enableMultipleStandardLoadBalancers", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableMultipleStandardLoadBalancer { get; set; } /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 30 minutes. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default value is 30 minutes.", + Description = @"Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value is 30 minutes.", SerializedName = @"idleTimeoutInMinutes", PossibleTypes = new [] { typeof(int) })] int? IdleTimeoutInMinute { get; set; } /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. + /// The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 1. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ", + Description = @"The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ", SerializedName = @"count", PossibleTypes = new [] { typeof(int) })] int? ManagedOutboundIPCount { get; set; } + /// + /// The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. ", + SerializedName = @"countIPv6", + PossibleTypes = new [] { typeof(int) })] + int? ManagedOutboundIPCountIpv6 { get; set; } /// A list of public IP prefix resources. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Description = @"A list of public IP prefix resources.", SerializedName = @"publicIPPrefixes", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } /// A list of public IP resources. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, Description = @"A list of public IP resources.", SerializedName = @"publicIPs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] OutboundIPPublicIP { get; set; } } /// Profile of the managed cluster load balancer. @@ -159,32 +192,39 @@ internal partial interface IManagedClusterLoadBalancerProfileInternal { /// - /// Desired number of allocated SNAT ports per VM. Allowed values must be in the range of 0 to 64000 (inclusive). The default + /// The desired number of allocated SNAT ports per VM. Allowed values are in the range of 0 to 64000 (inclusive). The default /// value is 0 which results in Azure dynamically allocating ports. /// int? AllocatedOutboundPort { get; set; } /// The effective outbound IP resources of the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] EffectiveOutboundIP { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] EffectiveOutboundIP { get; set; } + /// Enable multiple standard load balancers per AKS cluster or not. + bool? EnableMultipleStandardLoadBalancer { get; set; } /// - /// Desired outbound flow idle timeout in minutes. Allowed values must be in the range of 4 to 120 (inclusive). The default - /// value is 30 minutes. + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 30 minutes. /// int? IdleTimeoutInMinute { get; set; } /// Desired managed outbound IPs for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs ManagedOutboundIP { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs ManagedOutboundIP { get; set; } /// - /// Desired number of outbound IP created/managed by Azure for the cluster load balancer. Allowed values must be in the range - /// of 1 to 100 (inclusive). The default value is 1. + /// The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 1. /// int? ManagedOutboundIPCount { get; set; } + /// + /// The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + /// + int? ManagedOutboundIPCountIpv6 { get; set; } /// Desired outbound IP resources for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs OutboundIP { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs OutboundIP { get; set; } /// Desired outbound IP Prefix resources for the cluster load balancer. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes OutboundIPPrefix { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes OutboundIPPrefix { get; set; } /// A list of public IP prefix resources. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] OutboundIPPrefixPublicIpprefix { get; set; } /// A list of public IP resources. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] OutboundIPPublicIP { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] OutboundIPPublicIP { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.json.cs similarity index 88% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.json.cs index 01e95020cf41..1c459cae6d28 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterLoadBalancerProfile 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.Api20200901.IManagedClusterLoadBalancerProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterLoadBalancerProfile(json) : null; } @@ -77,12 +77,13 @@ internal ManagedClusterLoadBalancerProfile(Microsoft.Azure.PowerShell.Cmdlets.Ak { return; } - {_managedOutboundIP = If( json?.PropertyT("managedOutboundIPs"), out var __jsonManagedOutboundIPs) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileManagedOutboundIPs.FromJson(__jsonManagedOutboundIPs) : ManagedOutboundIP;} - {_outboundIPPrefix = If( json?.PropertyT("outboundIPPrefixes"), out var __jsonOutboundIPPrefixes) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPPrefixes.FromJson(__jsonOutboundIPPrefixes) : OutboundIPPrefix;} - {_outboundIP = If( json?.PropertyT("outboundIPs"), out var __jsonOutboundIPs) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterLoadBalancerProfileOutboundIPs.FromJson(__jsonOutboundIPs) : OutboundIP;} - {_effectiveOutboundIP = If( json?.PropertyT("effectiveOutboundIPs"), out var __jsonEffectiveOutboundIPs) ? If( __jsonEffectiveOutboundIPs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReference.FromJson(__u) )) ))() : null : EffectiveOutboundIP;} + {_managedOutboundIP = If( json?.PropertyT("managedOutboundIPs"), out var __jsonManagedOutboundIPs) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileManagedOutboundIPs.FromJson(__jsonManagedOutboundIPs) : ManagedOutboundIP;} + {_outboundIPPrefix = If( json?.PropertyT("outboundIPPrefixes"), out var __jsonOutboundIPPrefixes) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPPrefixes.FromJson(__jsonOutboundIPPrefixes) : OutboundIPPrefix;} + {_outboundIP = If( json?.PropertyT("outboundIPs"), out var __jsonOutboundIPs) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterLoadBalancerProfileOutboundIPs.FromJson(__jsonOutboundIPs) : OutboundIP;} + {_effectiveOutboundIP = If( json?.PropertyT("effectiveOutboundIPs"), out var __jsonEffectiveOutboundIPs) ? If( __jsonEffectiveOutboundIPs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReference.FromJson(__u) )) ))() : null : EffectiveOutboundIP;} {_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;} AfterFromJson(json); } @@ -119,6 +120,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro } 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 ); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.PowerShell.cs similarity index 81% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.PowerShell.cs index f535fc90f802..634dab5b7812 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterLoadBalancerProfileManagedOutboundIPs(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterLoadBalancerProfileManagedOutboundIPs(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs 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. @@ -108,13 +108,17 @@ internal ManagedClusterLoadBalancerProfileManagedOutboundIPs(global::System.Coll // actually deserialize if (content.Contains("Count")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CountIPv6")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).CountIPv6 = (int?) content.GetValueForProperty("CountIPv6",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).CountIPv6, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } 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. @@ -129,7 +133,11 @@ internal ManagedClusterLoadBalancerProfileManagedOutboundIPs(global::System.Mana // actually deserialize if (content.Contains("Count")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).Count, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("CountIPv6")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).CountIPv6 = (int?) content.GetValueForProperty("CountIPv6",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal)this).CountIPv6, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.TypeConverter.cs index 8e15dbe5d2d4..c4d2e4cf80c2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs new file mode 100644 index 000000000000..01084e808f03 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.cs @@ -0,0 +1,88 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Desired managed outbound IPs for the cluster load balancer. + public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal + { + + /// Backing field for property. + private int? _count; + + /// + /// The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 1. + /// + [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 int? _countIPv6; + + /// + /// The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? CountIPv6 { get => this._countIPv6; set => this._countIPv6 = value; } + + /// + /// Creates an new instance. + /// + public ManagedClusterLoadBalancerProfileManagedOutboundIPs() + { + + } + } + /// Desired managed outbound IPs for the cluster load balancer. + public partial interface IManagedClusterLoadBalancerProfileManagedOutboundIPs : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 1. ", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? Count { get; set; } + /// + /// The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. ", + SerializedName = @"countIPv6", + PossibleTypes = new [] { typeof(int) })] + int? CountIPv6 { get; set; } + + } + /// Desired managed outbound IPs for the cluster load balancer. + internal partial interface IManagedClusterLoadBalancerProfileManagedOutboundIPsInternal + + { + /// + /// The desired number of IPv4 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 1. + /// + int? Count { get; set; } + /// + /// The desired number of IPv6 outbound IPs created/managed by Azure for the cluster load balancer. Allowed values must be + /// in the range of 1 to 100 (inclusive). The default value is 0 for single-stack and 1 for dual-stack. + /// + int? CountIPv6 { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.json.cs similarity index 90% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.json.cs index 94a0eb616529..d982d58dd017 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileManagedOutboundIPs.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileManagedOutboundIPs.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterLoadBalancerProfileManagedOutboundIPs 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.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileManagedOutboundIPs FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileManagedOutboundIPs FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterLoadBalancerProfileManagedOutboundIPs(json) : null; } @@ -79,6 +79,7 @@ internal ManagedClusterLoadBalancerProfileManagedOutboundIPs(Microsoft.Azure.Pow return; } {_count = If( json?.PropertyT("count"), out var __jsonCount) ? (int?)__jsonCount : Count;} + {_countIPv6 = If( json?.PropertyT("countIPv6"), out var __jsonCountIPv6) ? (int?)__jsonCountIPv6 : CountIPv6;} AfterFromJson(json); } @@ -104,6 +105,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro return container; } 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 != this._countIPv6 ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._countIPv6) : null, "countIPv6" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.PowerShell.cs similarity index 86% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.PowerShell.cs index 426c59dc73b4..195476cfbd77 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterLoadBalancerProfileOutboundIPPrefixes partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterLoadBalancerProfileOutboundIPPrefixes(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterLoadBalancerProfileOutboundIPPrefixes(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes 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. @@ -108,13 +108,13 @@ internal ManagedClusterLoadBalancerProfileOutboundIPPrefixes(global::System.Coll // actually deserialize if (content.Contains("PublicIPPrefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)this).PublicIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("PublicIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)this).PublicIPPrefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)this).PublicIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("PublicIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)this).PublicIPPrefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.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. @@ -129,7 +129,7 @@ internal ManagedClusterLoadBalancerProfileOutboundIPPrefixes(global::System.Mana // actually deserialize if (content.Contains("PublicIPPrefix")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)this).PublicIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("PublicIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)this).PublicIPPrefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)this).PublicIPPrefix = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("PublicIPPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal)this).PublicIPPrefix, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.TypeConverter.cs index 96d070336fe0..5d8abff55cce 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -112,14 +112,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs similarity index 82% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs index b6e44b12b29d..27deaf89454f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Desired outbound IP Prefix resources for the cluster load balancer. public partial class ManagedClusterLoadBalancerProfileOutboundIPPrefixes : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] _publicIPPrefix; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] _publicIPPrefix; /// A list of public IP prefix resources. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] PublicIPPrefix { get => this._publicIPPrefix; set => this._publicIPPrefix = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] PublicIPPrefix { get => this._publicIPPrefix; set => this._publicIPPrefix = value; } /// /// Creates an new instance. @@ -38,8 +38,8 @@ public partial interface IManagedClusterLoadBalancerProfileOutboundIPPrefixes : ReadOnly = false, Description = @"A list of public IP prefix resources.", SerializedName = @"publicIPPrefixes", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] PublicIPPrefix { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] PublicIPPrefix { get; set; } } /// Desired outbound IP Prefix resources for the cluster load balancer. @@ -47,7 +47,7 @@ internal partial interface IManagedClusterLoadBalancerProfileOutboundIPPrefixesI { /// A list of public IP prefix resources. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] PublicIPPrefix { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] PublicIPPrefix { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.json.cs index 27d9b8b66e28..a6d629a4e984 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPPrefixes.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterLoadBalancerProfileOutboundIPPrefixes 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.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPPrefixes FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPPrefixes FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterLoadBalancerProfileOutboundIPPrefixes(json) : null; } @@ -78,7 +78,7 @@ internal ManagedClusterLoadBalancerProfileOutboundIPPrefixes(Microsoft.Azure.Pow { return; } - {_publicIPPrefix = If( json?.PropertyT("publicIPPrefixes"), out var __jsonPublicIPPrefixes) ? If( __jsonPublicIPPrefixes as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReference.FromJson(__u) )) ))() : null : PublicIPPrefix;} + {_publicIPPrefix = If( json?.PropertyT("publicIPPrefixes"), out var __jsonPublicIPPrefixes) ? If( __jsonPublicIPPrefixes as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReference.FromJson(__u) )) ))() : null : PublicIPPrefix;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.PowerShell.cs similarity index 86% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.PowerShell.cs index 7163a4d9f2fc..aafc0fdd0bf9 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterLoadBalancerProfileOutboundIPs partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterLoadBalancerProfileOutboundIPs(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterLoadBalancerProfileOutboundIPs(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs 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. @@ -108,13 +108,13 @@ internal ManagedClusterLoadBalancerProfileOutboundIPs(global::System.Collections // actually deserialize if (content.Contains("PublicIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPsInternal)this).PublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("PublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPsInternal)this).PublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPsInternal)this).PublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("PublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPsInternal)this).PublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.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. @@ -129,7 +129,7 @@ internal ManagedClusterLoadBalancerProfileOutboundIPs(global::System.Management. // actually deserialize if (content.Contains("PublicIP")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPsInternal)this).PublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[]) content.GetValueForProperty("PublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPsInternal)this).PublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReferenceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPsInternal)this).PublicIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("PublicIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPsInternal)this).PublicIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.TypeConverter.cs index 36f28a62ad1b..582a7397865b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.cs similarity index 81% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.cs index 72822be4fccb..38e8cf4d6b81 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Desired outbound IP resources for the cluster load balancer. public partial class ManagedClusterLoadBalancerProfileOutboundIPs : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPsInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPsInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] _publicIP; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] _publicIP; /// A list of public IP resources. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] PublicIP { get => this._publicIP; set => this._publicIP = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] PublicIP { get => this._publicIP; set => this._publicIP = value; } /// /// Creates an new instance. @@ -38,8 +38,8 @@ public partial interface IManagedClusterLoadBalancerProfileOutboundIPs : ReadOnly = false, Description = @"A list of public IP resources.", SerializedName = @"publicIPs", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] PublicIP { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] PublicIP { get; set; } } /// Desired outbound IP resources for the cluster load balancer. @@ -47,7 +47,7 @@ internal partial interface IManagedClusterLoadBalancerProfileOutboundIPsInternal { /// A list of public IP resources. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference[] PublicIP { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] PublicIP { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.json.cs index fbb46e1acf36..91ef285bb044 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterLoadBalancerProfileOutboundIPs.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterLoadBalancerProfileOutboundIPs.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterLoadBalancerProfileOutboundIPs 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.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterLoadBalancerProfileOutboundIPs FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterLoadBalancerProfileOutboundIPs FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterLoadBalancerProfileOutboundIPs(json) : null; } @@ -78,7 +78,7 @@ internal ManagedClusterLoadBalancerProfileOutboundIPs(Microsoft.Azure.PowerShell { return; } - {_publicIP = If( json?.PropertyT("publicIPs"), out var __jsonPublicIPs) ? If( __jsonPublicIPs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceReference.FromJson(__u) )) ))() : null : PublicIP;} + {_publicIP = If( json?.PropertyT("publicIPs"), out var __jsonPublicIPs) ? If( __jsonPublicIPs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReference.FromJson(__u) )) ))() : null : PublicIP;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.PowerShell.cs new file mode 100644 index 000000000000..ba703c376bcb --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Profile of the managed outbound IP resources of the managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterManagedOutboundIPProfileTypeConverter))] + public partial class ManagedClusterManagedOutboundIPProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterManagedOutboundIPProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterManagedOutboundIPProfile(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.Api20230201.IManagedClusterManagedOutboundIPProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterManagedOutboundIPProfile(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.Api20230201.IManagedClusterManagedOutboundIPProfile 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 ManagedClusterManagedOutboundIPProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfileInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfileInternal)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 ManagedClusterManagedOutboundIPProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Count")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfileInternal)this).Count = (int?) content.GetValueForProperty("Count",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfileInternal)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(); + } + /// Profile of the managed outbound IP resources of the managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterManagedOutboundIPProfileTypeConverter))] + public partial interface IManagedClusterManagedOutboundIPProfile + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.TypeConverter.cs new file mode 100644 index 000000000000..35437a69dcd5 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterManagedOutboundIPProfileTypeConverter : 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.Api20230201.IManagedClusterManagedOutboundIPProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterManagedOutboundIPProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterManagedOutboundIPProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterManagedOutboundIPProfile.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.cs new file mode 100644 index 000000000000..24890007fdf6 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.cs @@ -0,0 +1,60 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Profile of the managed outbound IP resources of the managed cluster. + public partial class ManagedClusterManagedOutboundIPProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfileInternal + { + + /// Backing field for property. + private int? _count; + + /// + /// The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). + /// The default value is 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? Count { get => this._count; set => this._count = value; } + + /// Creates an new instance. + public ManagedClusterManagedOutboundIPProfile() + { + + } + } + /// Profile of the managed outbound IP resources of the managed cluster. + public partial interface IManagedClusterManagedOutboundIPProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). + /// The default value is 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. ", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? Count { get; set; } + + } + /// Profile of the managed outbound IP resources of the managed cluster. + internal partial interface IManagedClusterManagedOutboundIPProfileInternal + + { + /// + /// The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). + /// The default value is 1. + /// + int? Count { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.json.cs new file mode 100644 index 000000000000..24727977cf81 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterManagedOutboundIPProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Profile of the managed outbound IP resources of the managed cluster. + public partial class ManagedClusterManagedOutboundIPProfile + { + + /// + /// 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.Api20230201.IManagedClusterManagedOutboundIPProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterManagedOutboundIPProfile(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 ManagedClusterManagedOutboundIPProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_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 != 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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.PowerShell.cs new file mode 100644 index 000000000000..290d2a78304d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.PowerShell.cs @@ -0,0 +1,170 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Profile of the managed cluster NAT gateway. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterNatGatewayProfileTypeConverter))] + public partial class ManagedClusterNatGatewayProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterNatGatewayProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterNatGatewayProfile(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.Api20230201.IManagedClusterNatGatewayProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterNatGatewayProfile(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.Api20230201.IManagedClusterNatGatewayProfile 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 ManagedClusterNatGatewayProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ManagedOutboundIPProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).ManagedOutboundIPProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile) content.GetValueForProperty("ManagedOutboundIPProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).ManagedOutboundIPProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterManagedOutboundIPProfileTypeConverter.ConvertFrom); + } + if (content.Contains("EffectiveOutboundIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).EffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("EffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).EffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("IdleTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).IdleTimeoutInMinute = (int?) content.GetValueForProperty("IdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).IdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ManagedOutboundIPProfileCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).ManagedOutboundIPProfileCount = (int?) content.GetValueForProperty("ManagedOutboundIPProfileCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).ManagedOutboundIPProfileCount, (__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 ManagedClusterNatGatewayProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("ManagedOutboundIPProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).ManagedOutboundIPProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile) content.GetValueForProperty("ManagedOutboundIPProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).ManagedOutboundIPProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterManagedOutboundIPProfileTypeConverter.ConvertFrom); + } + if (content.Contains("EffectiveOutboundIP")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).EffectiveOutboundIP = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[]) content.GetValueForProperty("EffectiveOutboundIP",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).EffectiveOutboundIP, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReferenceTypeConverter.ConvertFrom)); + } + if (content.Contains("IdleTimeoutInMinute")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).IdleTimeoutInMinute = (int?) content.GetValueForProperty("IdleTimeoutInMinute",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).IdleTimeoutInMinute, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("ManagedOutboundIPProfileCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).ManagedOutboundIPProfileCount = (int?) content.GetValueForProperty("ManagedOutboundIPProfileCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal)this).ManagedOutboundIPProfileCount, (__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(); + } + /// Profile of the managed cluster NAT gateway. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterNatGatewayProfileTypeConverter))] + public partial interface IManagedClusterNatGatewayProfile + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.TypeConverter.cs new file mode 100644 index 000000000000..70429c78f177 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterNatGatewayProfileTypeConverter : 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.Api20230201.IManagedClusterNatGatewayProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterNatGatewayProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterNatGatewayProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterNatGatewayProfile.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.cs new file mode 100644 index 000000000000..58b9a98e3968 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Profile of the managed cluster NAT gateway. + public partial class ManagedClusterNatGatewayProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] _effectiveOutboundIP; + + /// The effective outbound IP resources of the cluster NAT gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] EffectiveOutboundIP { get => this._effectiveOutboundIP; set => this._effectiveOutboundIP = value; } + + /// Backing field for property. + private int? _idleTimeoutInMinute; + + /// + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 4 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? IdleTimeoutInMinute { get => this._idleTimeoutInMinute; set => this._idleTimeoutInMinute = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile _managedOutboundIPProfile; + + /// Profile of the managed outbound IP resources of the cluster NAT gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile ManagedOutboundIPProfile { get => (this._managedOutboundIPProfile = this._managedOutboundIPProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterManagedOutboundIPProfile()); set => this._managedOutboundIPProfile = value; } + + /// + /// The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). + /// The default value is 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? ManagedOutboundIPProfileCount { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfileInternal)ManagedOutboundIPProfile).Count; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfileInternal)ManagedOutboundIPProfile).Count = value ?? default(int); } + + /// Internal Acessors for ManagedOutboundIPProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfileInternal.ManagedOutboundIPProfile { get => (this._managedOutboundIPProfile = this._managedOutboundIPProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterManagedOutboundIPProfile()); set { {_managedOutboundIPProfile = value;} } } + + /// Creates an new instance. + public ManagedClusterNatGatewayProfile() + { + + } + } + /// Profile of the managed cluster NAT gateway. + public partial interface IManagedClusterNatGatewayProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The effective outbound IP resources of the cluster NAT gateway. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The effective outbound IP resources of the cluster NAT gateway.", + SerializedName = @"effectiveOutboundIPs", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] EffectiveOutboundIP { get; set; } + /// + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 4 minutes. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value is 4 minutes.", + SerializedName = @"idleTimeoutInMinutes", + PossibleTypes = new [] { typeof(int) })] + int? IdleTimeoutInMinute { get; set; } + /// + /// The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). + /// The default value is 1. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). The default value is 1. ", + SerializedName = @"count", + PossibleTypes = new [] { typeof(int) })] + int? ManagedOutboundIPProfileCount { get; set; } + + } + /// Profile of the managed cluster NAT gateway. + internal partial interface IManagedClusterNatGatewayProfileInternal + + { + /// The effective outbound IP resources of the cluster NAT gateway. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference[] EffectiveOutboundIP { get; set; } + /// + /// Desired outbound flow idle timeout in minutes. Allowed values are in the range of 4 to 120 (inclusive). The default value + /// is 4 minutes. + /// + int? IdleTimeoutInMinute { get; set; } + /// Profile of the managed outbound IP resources of the cluster NAT gateway. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterManagedOutboundIPProfile ManagedOutboundIPProfile { get; set; } + /// + /// The desired number of outbound IPs created/managed by Azure. Allowed values must be in the range of 1 to 16 (inclusive). + /// The default value is 1. + /// + int? ManagedOutboundIPProfileCount { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.json.cs new file mode 100644 index 000000000000..88d8a2948470 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterNatGatewayProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Profile of the managed cluster NAT gateway. + public partial class ManagedClusterNatGatewayProfile + { + + /// + /// 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.Api20230201.IManagedClusterNatGatewayProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterNatGatewayProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterNatGatewayProfile(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 ManagedClusterNatGatewayProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_managedOutboundIPProfile = If( json?.PropertyT("managedOutboundIPProfile"), out var __jsonManagedOutboundIPProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterManagedOutboundIPProfile.FromJson(__jsonManagedOutboundIPProfile) : ManagedOutboundIPProfile;} + {_effectiveOutboundIP = If( json?.PropertyT("effectiveOutboundIPs"), out var __jsonEffectiveOutboundIPs) ? If( __jsonEffectiveOutboundIPs as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ResourceReference.FromJson(__u) )) ))() : null : EffectiveOutboundIP;} + {_idleTimeoutInMinute = If( json?.PropertyT("idleTimeoutInMinutes"), out var __jsonIdleTimeoutInMinutes) ? (int?)__jsonIdleTimeoutInMinutes : IdleTimeoutInMinute;} + 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._managedOutboundIPProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._managedOutboundIPProfile.ToJson(null,serializationMode) : null, "managedOutboundIPProfile" ,container.Add ); + if (null != this._effectiveOutboundIP) + { + 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); + } + 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); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.PowerShell.cs similarity index 66% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.PowerShell.cs index 24a842fb3c51..d55cd00de7b8 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.PowerShell.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Profile for diagnostics on the container service VMs. - [System.ComponentModel.TypeConverter(typeof(ContainerServiceVMDiagnosticsTypeConverter))] - public partial class ContainerServiceVMDiagnostics + /// The OIDC issuer profile of the Managed Cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterOidcIssuerProfileTypeConverter))] + public partial class ManagedClusterOidcIssuerProfile { /// @@ -55,11 +55,46 @@ public partial class ContainerServiceVMDiagnostics partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 ContainerServiceVMDiagnostics(global::System.Collections.IDictionary content) + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterOidcIssuerProfile(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.Api20230201.IManagedClusterOidcIssuerProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterOidcIssuerProfile(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.Api20230201.IManagedClusterOidcIssuerProfile 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 ManagedClusterOidcIssuerProfile(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -68,23 +103,23 @@ internal ContainerServiceVMDiagnostics(global::System.Collections.IDictionary co return; } // actually deserialize - if (content.Contains("Enabled")) + if (content.Contains("IssuerUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)this).IssuerUrl = (string) content.GetValueForProperty("IssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)this).IssuerUrl, global::System.Convert.ToString); } - if (content.Contains("StorageUri")) + if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)this).StorageUri = (string) content.GetValueForProperty("StorageUri",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)this).StorageUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } 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 ContainerServiceVMDiagnostics(global::System.Management.Automation.PSObject content) + internal ManagedClusterOidcIssuerProfile(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -93,58 +128,25 @@ internal ContainerServiceVMDiagnostics(global::System.Management.Automation.PSOb return; } // actually deserialize - if (content.Contains("Enabled")) + if (content.Contains("IssuerUrl")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)this).IssuerUrl = (string) content.GetValueForProperty("IssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)this).IssuerUrl, global::System.Convert.ToString); } - if (content.Contains("StorageUri")) + if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)this).StorageUri = (string) content.GetValueForProperty("StorageUri",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnosticsInternal)this).StorageUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)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.Api20200901.IContainerServiceVMDiagnostics DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ContainerServiceVMDiagnostics(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.Api20200901.IContainerServiceVMDiagnostics DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ContainerServiceVMDiagnostics(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.Api20200901.IContainerServiceVMDiagnostics 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(); } - /// Profile for diagnostics on the container service VMs. - [System.ComponentModel.TypeConverter(typeof(ContainerServiceVMDiagnosticsTypeConverter))] - public partial interface IContainerServiceVMDiagnostics + /// The OIDC issuer profile of the Managed Cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterOidcIssuerProfileTypeConverter))] + public partial interface IManagedClusterOidcIssuerProfile { diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.TypeConverter.cs new file mode 100644 index 000000000000..7be612997db8 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterOidcIssuerProfileTypeConverter : 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.Api20230201.IManagedClusterOidcIssuerProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterOidcIssuerProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterOidcIssuerProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterOidcIssuerProfile.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.cs new file mode 100644 index 000000000000..eca201040e57 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The OIDC issuer profile of the Managed Cluster. + public partial class ManagedClusterOidcIssuerProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// Whether the OIDC issuer is enabled. + [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 _issuerUrl; + + /// The OIDC issuer url of the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string IssuerUrl { get => this._issuerUrl; } + + /// Internal Acessors for IssuerUrl + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal.IssuerUrl { get => this._issuerUrl; set { {_issuerUrl = value;} } } + + /// Creates an new instance. + public ManagedClusterOidcIssuerProfile() + { + + } + } + /// The OIDC issuer profile of the Managed Cluster. + public partial interface IManagedClusterOidcIssuerProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether the OIDC issuer is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the OIDC issuer is enabled.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// The OIDC issuer url of the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OIDC issuer url of the Managed Cluster.", + SerializedName = @"issuerURL", + PossibleTypes = new [] { typeof(string) })] + string IssuerUrl { get; } + + } + /// The OIDC issuer profile of the Managed Cluster. + internal partial interface IManagedClusterOidcIssuerProfileInternal + + { + /// Whether the OIDC issuer is enabled. + bool? Enabled { get; set; } + /// The OIDC issuer url of the Managed Cluster. + string IssuerUrl { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.json.cs new file mode 100644 index 000000000000..4a452e793a12 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterOidcIssuerProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The OIDC issuer profile of the Managed Cluster. + public partial class ManagedClusterOidcIssuerProfile + { + + /// + /// 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.Api20230201.IManagedClusterOidcIssuerProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterOidcIssuerProfile(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 ManagedClusterOidcIssuerProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_issuerUrl = If( json?.PropertyT("issuerURL"), out var __jsonIssuerUrl) ? (string)__jsonIssuerUrl : (string)IssuerUrl;} + {_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; + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._issuerUrl)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._issuerUrl.ToString()) : null, "issuerURL" ,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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.PowerShell.cs new file mode 100644 index 000000000000..2560935d827c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Details about the pod identity assigned to the Managed Cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityTypeConverter))] + public partial class ManagedClusterPodIdentity + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterPodIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterPodIdentity(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.Api20230201.IManagedClusterPodIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterPodIdentity(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.Api20230201.IManagedClusterPodIdentity 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 ManagedClusterPodIdentity(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningInfo = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfo) content.GetValueForProperty("ProvisioningInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningInfo, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningInfoTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("BindingSelector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).BindingSelector = (string) content.GetValueForProperty("BindingSelector",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).BindingSelector, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState.CreateFrom); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("IdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityClientId, global::System.Convert.ToString); + } + if (content.Contains("IdentityObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityObjectId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningInfoError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningInfoError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError) content.GetValueForProperty("ProvisioningInfoError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningInfoError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningErrorBodyError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningErrorBodyError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) content.GetValueForProperty("ProvisioningErrorBodyError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningErrorBodyError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterPodIdentity(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Identity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Identity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity) content.GetValueForProperty("Identity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Identity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningInfo")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningInfo = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfo) content.GetValueForProperty("ProvisioningInfo",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningInfo, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningInfoTypeConverter.ConvertFrom); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Namespace")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Namespace, global::System.Convert.ToString); + } + if (content.Contains("BindingSelector")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).BindingSelector = (string) content.GetValueForProperty("BindingSelector",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).BindingSelector, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState.CreateFrom); + } + if (content.Contains("IdentityResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityResourceId = (string) content.GetValueForProperty("IdentityResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityResourceId, global::System.Convert.ToString); + } + if (content.Contains("IdentityClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityClientId = (string) content.GetValueForProperty("IdentityClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityClientId, global::System.Convert.ToString); + } + if (content.Contains("IdentityObjectId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityObjectId = (string) content.GetValueForProperty("IdentityObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).IdentityObjectId, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningInfoError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningInfoError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError) content.GetValueForProperty("ProvisioningInfoError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningInfoError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningErrorBodyError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningErrorBodyError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) content.GetValueForProperty("ProvisioningErrorBodyError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).ProvisioningErrorBodyError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.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(); + } + /// Details about the pod identity assigned to the Managed Cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityTypeConverter))] + public partial interface IManagedClusterPodIdentity + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.TypeConverter.cs new file mode 100644 index 000000000000..ff949b9451eb --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterPodIdentityTypeConverter : 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.Api20230201.IManagedClusterPodIdentity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterPodIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentity.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.cs new file mode 100644 index 000000000000..1aec6a75fb0d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.cs @@ -0,0 +1,254 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Details about the pod identity assigned to the Managed Cluster. + public partial class ManagedClusterPodIdentity : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal + { + + /// Backing field for property. + private string _bindingSelector; + + /// The binding selector to use for the AzureIdentityBinding resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string BindingSelector { get => this._bindingSelector; set => this._bindingSelector = value; } + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Detail = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity _identity; + + /// The user assigned identity details. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentity()); 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.Api20230201.IUserAssignedIdentityInternal)Identity).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)Identity).ClientId = value ?? null; } + + /// 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.Api20230201.IUserAssignedIdentityInternal)Identity).ObjectId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)Identity).ObjectId = value ?? null; } + + /// 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.Api20230201.IUserAssignedIdentityInternal)Identity).ResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)Identity).ResourceId = value ?? null; } + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Message = value ?? null; } + + /// Internal Acessors for Identity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal.Identity { get => (this._identity = this._identity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentity()); set { {_identity = value;} } } + + /// Internal Acessors for ProvisioningErrorBodyError + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal.ProvisioningErrorBodyError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).ManagedClusterPodIdentityProvisioningErrorBodyError; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).ManagedClusterPodIdentityProvisioningErrorBodyError = value; } + + /// Internal Acessors for ProvisioningInfo + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfo Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal.ProvisioningInfo { get => (this._provisioningInfo = this._provisioningInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningInfo()); set { {_provisioningInfo = value;} } } + + /// Internal Acessors for ProvisioningInfoError + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal.ProvisioningInfoError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Error = value; } + + /// Internal Acessors for ProvisioningState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the pod identity. + [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 string _namespace; + + /// The namespace of the pod identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Namespace { get => this._namespace; set => this._namespace = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfo _provisioningInfo; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfo ProvisioningInfo { get => (this._provisioningInfo = this._provisioningInfo ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningInfo()); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState? _provisioningState; + + /// The current provisioning state of the pod identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState? ProvisioningState { get => this._provisioningState; } + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)ProvisioningInfo).Target = value ?? null; } + + /// Creates an new instance. + public ManagedClusterPodIdentity() + { + + } + } + /// Details about the pod identity assigned to the Managed Cluster. + public partial interface IManagedClusterPodIdentity : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The binding selector to use for the AzureIdentityBinding resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The binding selector to use for the AzureIdentityBinding resource.", + SerializedName = @"bindingSelector", + PossibleTypes = new [] { typeof(string) })] + string BindingSelector { get; set; } + /// + /// 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, + 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, + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] Detail { get; set; } + /// The client ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The client ID of the user assigned identity.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string IdentityClientId { get; set; } + /// The object ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The object ID of the user assigned identity.", + SerializedName = @"objectId", + PossibleTypes = new [] { typeof(string) })] + string IdentityObjectId { get; set; } + /// The resource ID of the user assigned identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The resource ID of the user assigned identity.", + SerializedName = @"resourceId", + PossibleTypes = new [] { typeof(string) })] + string IdentityResourceId { 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, + 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 name of the pod identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pod identity.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The namespace of the pod identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace of the pod identity.", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string Namespace { get; set; } + /// The current provisioning state of the pod identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current provisioning state of the pod identity.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState? ProvisioningState { get; } + /// + /// 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, + 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; } + + } + /// Details about the pod identity assigned to the Managed Cluster. + internal partial interface IManagedClusterPodIdentityInternal + + { + /// The binding selector to use for the AzureIdentityBinding resource. + string BindingSelector { get; set; } + /// + /// 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. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] Detail { get; set; } + /// The user assigned identity details. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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; } + /// + /// A message describing the error, intended to be suitable for display in a user interface. + /// + string Message { get; set; } + /// The name of the pod identity. + string Name { get; set; } + /// The namespace of the pod identity. + string Namespace { get; set; } + /// Details about the error. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody ProvisioningErrorBodyError { get; set; } + + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfo ProvisioningInfo { get; set; } + /// Pod identity assignment error (if any). + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError ProvisioningInfoError { get; set; } + /// The current provisioning state of the pod identity. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState? ProvisioningState { 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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.json.cs new file mode 100644 index 000000000000..9f4d9ef1b487 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentity.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Details about the pod identity assigned to the Managed Cluster. + public partial class ManagedClusterPodIdentity + { + + /// + /// 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.Api20230201.IManagedClusterPodIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPodIdentity(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 ManagedClusterPodIdentity(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.UserAssignedIdentity.FromJson(__jsonIdentity) : Identity;} + {_provisioningInfo = If( json?.PropertyT("provisioningInfo"), out var __jsonProvisioningInfo) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningInfo.FromJson(__jsonProvisioningInfo) : ProvisioningInfo;} + {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)Namespace;} + {_bindingSelector = If( json?.PropertyT("bindingSelector"), out var __jsonBindingSelector) ? (string)__jsonBindingSelector : (string)BindingSelector;} + {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} + 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._identity ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._provisioningInfo ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._provisioningInfo.ToJson(null,serializationMode) : null, "provisioningInfo" ,container.Add ); + } + 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._namespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._namespace.ToString()) : null, "namespace" ,container.Add ); + AddIf( null != (((object)this._bindingSelector)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._bindingSelector.ToString()) : null, "bindingSelector" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + 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 ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.PowerShell.cs similarity index 61% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.PowerShell.cs index 8fed13757fa2..55dfc065d663 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceDiagnosticsProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.PowerShell.cs @@ -3,13 +3,16 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Profile for diagnostics on the container service cluster. - [System.ComponentModel.TypeConverter(typeof(ContainerServiceDiagnosticsProfileTypeConverter))] - public partial class ContainerServiceDiagnosticsProfile + /// + /// 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 class ManagedClusterPodIdentityException { /// @@ -55,11 +58,48 @@ public partial class ContainerServiceDiagnosticsProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 ContainerServiceDiagnosticsProfile(global::System.Collections.IDictionary content) + /// + /// an instance of . + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterPodIdentityException(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.Api20230201.IManagedClusterPodIdentityException DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterPodIdentityException(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.Api20230201.IManagedClusterPodIdentityException 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 ManagedClusterPodIdentityException(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -68,27 +108,27 @@ internal ContainerServiceDiagnosticsProfile(global::System.Collections.IDictiona return; } // actually deserialize - if (content.Contains("VMDiagnostic")) + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics) content.GetValueForProperty("VMDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnostic, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceVMDiagnosticsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).Name, global::System.Convert.ToString); } - if (content.Contains("VMDiagnosticEnabled")) + if (content.Contains("Namespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnosticEnabled = (bool) content.GetValueForProperty("VMDiagnosticEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnosticEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).Namespace, global::System.Convert.ToString); } - if (content.Contains("VMDiagnosticStorageUri")) + if (content.Contains("PodLabel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnosticStorageUri = (string) content.GetValueForProperty("VMDiagnosticStorageUri",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnosticStorageUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).PodLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabels) content.GetValueForProperty("PodLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).PodLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionPodLabelsTypeConverter.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 ContainerServiceDiagnosticsProfile(global::System.Management.Automation.PSObject content) + internal ManagedClusterPodIdentityException(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -97,66 +137,30 @@ internal ContainerServiceDiagnosticsProfile(global::System.Management.Automation return; } // actually deserialize - if (content.Contains("VMDiagnostic")) + if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnostic = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics) content.GetValueForProperty("VMDiagnostic",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnostic, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceVMDiagnosticsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).Name, global::System.Convert.ToString); } - if (content.Contains("VMDiagnosticEnabled")) + if (content.Contains("Namespace")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnosticEnabled = (bool) content.GetValueForProperty("VMDiagnosticEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnosticEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).Namespace = (string) content.GetValueForProperty("Namespace",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).Namespace, global::System.Convert.ToString); } - if (content.Contains("VMDiagnosticStorageUri")) + if (content.Contains("PodLabel")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnosticStorageUri = (string) content.GetValueForProperty("VMDiagnosticStorageUri",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceDiagnosticsProfileInternal)this).VMDiagnosticStorageUri, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).PodLabel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabels) content.GetValueForProperty("PodLabel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal)this).PodLabel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionPodLabelsTypeConverter.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.Api20200901.IContainerServiceDiagnosticsProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) - { - return new ContainerServiceDiagnosticsProfile(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.Api20200901.IContainerServiceDiagnosticsProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) - { - return new ContainerServiceDiagnosticsProfile(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.Api20200901.IContainerServiceDiagnosticsProfile 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(); } - /// Profile for diagnostics on the container service cluster. - [System.ComponentModel.TypeConverter(typeof(ContainerServiceDiagnosticsProfileTypeConverter))] - public partial interface IContainerServiceDiagnosticsProfile + /// 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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.TypeConverter.cs new file mode 100644 index 000000000000..16fe4a1e004c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterPodIdentityExceptionTypeConverter : 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.Api20230201.IManagedClusterPodIdentityException ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterPodIdentityException.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityException.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityException.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.cs new file mode 100644 index 000000000000..69b4a3fb2bbc --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.cs @@ -0,0 +1,90 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + 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/) + /// for more details. + /// + public partial class ManagedClusterPodIdentityException : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionInternal + { + + /// Backing field for property. + private string _name; + + /// The name of the pod identity exception. + [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 string _namespace; + + /// The namespace of the pod identity exception. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Namespace { get => this._namespace; set => this._namespace = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabels _podLabel; + + /// The pod labels to match. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabels PodLabel { get => (this._podLabel = this._podLabel ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionPodLabels()); set => this._podLabel = value; } + + /// Creates an new instance. + public ManagedClusterPodIdentityException() + { + + } + } + /// 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 + { + /// The name of the pod identity exception. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the pod identity exception.", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; set; } + /// The namespace of the pod identity exception. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The namespace of the pod identity exception.", + SerializedName = @"namespace", + PossibleTypes = new [] { typeof(string) })] + string Namespace { get; set; } + /// The pod labels to match. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The pod labels to match.", + SerializedName = @"podLabels", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabels) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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/) + /// for more details. + internal partial interface IManagedClusterPodIdentityExceptionInternal + + { + /// The name of the pod identity exception. + string Name { get; set; } + /// The namespace of the pod identity exception. + string Namespace { get; set; } + /// The pod labels to match. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabels PodLabel { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.json.cs new file mode 100644 index 000000000000..38fbf29c082f --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityException.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.Api20230201 +{ + 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/) + /// for more details. + /// + public partial class ManagedClusterPodIdentityException + { + + /// + /// 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.Api20230201.IManagedClusterPodIdentityException. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPodIdentityException(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 ManagedClusterPodIdentityException(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;} + {_namespace = If( json?.PropertyT("namespace"), out var __jsonNamespace) ? (string)__jsonNamespace : (string)Namespace;} + {_podLabel = If( json?.PropertyT("podLabels"), out var __jsonPodLabels) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionPodLabels.FromJson(__jsonPodLabels) : PodLabel;} + 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._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._namespace)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._namespace.ToString()) : null, "namespace" ,container.Add ); + AddIf( null != this._podLabel ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._podLabel.ToJson(null,serializationMode) : null, "podLabels" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.PowerShell.cs new file mode 100644 index 000000000000..d7c59ad90989 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The pod labels to match. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityExceptionPodLabelsTypeConverter))] + public partial class ManagedClusterPodIdentityExceptionPodLabels + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterPodIdentityExceptionPodLabels DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterPodIdentityExceptionPodLabels(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.Api20230201.IManagedClusterPodIdentityExceptionPodLabels DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterPodIdentityExceptionPodLabels(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.Api20230201.IManagedClusterPodIdentityExceptionPodLabels 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 ManagedClusterPodIdentityExceptionPodLabels(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 ManagedClusterPodIdentityExceptionPodLabels(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(); + } + /// The pod labels to match. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityExceptionPodLabelsTypeConverter))] + public partial interface IManagedClusterPodIdentityExceptionPodLabels + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.TypeConverter.cs new file mode 100644 index 000000000000..03a1830f1c94 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterPodIdentityExceptionPodLabelsTypeConverter : 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.Api20230201.IManagedClusterPodIdentityExceptionPodLabels ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabels).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterPodIdentityExceptionPodLabels.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityExceptionPodLabels.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityExceptionPodLabels.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.cs new file mode 100644 index 000000000000..f18484642a91 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.cs @@ -0,0 +1,37 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The pod labels to match. + public partial class ManagedClusterPodIdentityExceptionPodLabels : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabels, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabelsInternal + { + + /// + /// Creates an new instance. + /// + public ManagedClusterPodIdentityExceptionPodLabels() + { + + } + } + /// The pod labels to match. + public partial interface IManagedClusterPodIdentityExceptionPodLabels : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + { + + } + /// The pod labels to match. + internal partial interface IManagedClusterPodIdentityExceptionPodLabelsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.dictionary.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.dictionary.cs new file mode 100644 index 000000000000..ff15976e22e3 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + public partial class ManagedClusterPodIdentityExceptionPodLabels : + 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 string this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + + /// + /// + public void Add(global::System.String key, string 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 string value) => __additionalProperties.TryGetValue( key, out value); + + /// + + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionPodLabels source) => source.__additionalProperties; + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.json.cs new file mode 100644 index 000000000000..94e156127a7e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityExceptionPodLabels.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The pod labels to match. + public partial class ManagedClusterPodIdentityExceptionPodLabels + { + + /// + /// 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.Api20230201.IManagedClusterPodIdentityExceptionPodLabels. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabels. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityExceptionPodLabels FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPodIdentityExceptionPodLabels(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 ManagedClusterPodIdentityExceptionPodLabels(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, null ,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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.PowerShell.cs new file mode 100644 index 000000000000..694b42973a9e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.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.Api20230201 +{ + 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. + /// + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityProfileTypeConverter))] + public partial class ManagedClusterPodIdentityProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterPodIdentityProfile(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.Api20230201.IManagedClusterPodIdentityProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterPodIdentityProfile(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.Api20230201.IManagedClusterPodIdentityProfile 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 ManagedClusterPodIdentityProfile(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.Api20230201.IManagedClusterPodIdentityProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllowNetworkPluginKubenet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).AllowNetworkPluginKubenet = (bool?) content.GetValueForProperty("AllowNetworkPluginKubenet",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).AllowNetworkPluginKubenet, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("UserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[]) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).UserAssignedIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("UserAssignedIdentityException")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).UserAssignedIdentityException = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[]) content.GetValueForProperty("UserAssignedIdentityException",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).UserAssignedIdentityException, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterPodIdentityProfile(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.Api20230201.IManagedClusterPodIdentityProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AllowNetworkPluginKubenet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).AllowNetworkPluginKubenet = (bool?) content.GetValueForProperty("AllowNetworkPluginKubenet",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).AllowNetworkPluginKubenet, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("UserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).UserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[]) content.GetValueForProperty("UserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).UserAssignedIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("UserAssignedIdentityException")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).UserAssignedIdentityException = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[]) content.GetValueForProperty("UserAssignedIdentityException",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)this).UserAssignedIdentityException, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionTypeConverter.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(); + } + /// 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 + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.TypeConverter.cs new file mode 100644 index 000000000000..789cf9232f10 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterPodIdentityProfileTypeConverter : 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.Api20230201.IManagedClusterPodIdentityProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterPodIdentityProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityProfile.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.cs new file mode 100644 index 000000000000..48f8b7045169 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.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.Api20230201 +{ + 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. + /// + public partial class ManagedClusterPodIdentityProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal + { + + /// Backing field for property. + 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) + /// for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? AllowNetworkPluginKubenet { get => this._allowNetworkPluginKubenet; set => this._allowNetworkPluginKubenet = value; } + + /// Backing field for property. + private bool? _enabled; + + /// Whether the pod identity addon is enabled. + [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.Api20230201.IManagedClusterPodIdentity[] _userAssignedIdentity; + + /// The pod identities to use in the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[] UserAssignedIdentity { get => this._userAssignedIdentity; set => this._userAssignedIdentity = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[] _userAssignedIdentityException; + + /// The pod identity exceptions to allow. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[] UserAssignedIdentityException { get => this._userAssignedIdentityException; set => this._userAssignedIdentityException = value; } + + /// Creates an new instance. + 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. + 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) + /// for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"allowNetworkPluginKubenet", + PossibleTypes = new [] { typeof(bool) })] + bool? AllowNetworkPluginKubenet { get; set; } + /// Whether the pod identity addon is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the pod identity addon is enabled.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// The pod identities to use in the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The pod identities to use in the cluster.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[] UserAssignedIdentity { get; set; } + /// The pod identity exceptions to allow. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The pod identity exceptions to allow.", + SerializedName = @"userAssignedIdentityExceptions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[] 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. + 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) + /// for more information. + /// + bool? AllowNetworkPluginKubenet { get; set; } + /// Whether the pod identity addon is enabled. + bool? Enabled { get; set; } + /// The pod identities to use in the cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[] UserAssignedIdentity { get; set; } + /// The pod identity exceptions to allow. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[] UserAssignedIdentityException { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.json.cs new file mode 100644 index 000000000000..0e9033a7886c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProfile.json.cs @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + 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. + /// + public partial class ManagedClusterPodIdentityProfile + { + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPodIdentityProfile(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 ManagedClusterPodIdentityProfile(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;} + {_allowNetworkPluginKubenet = If( json?.PropertyT("allowNetworkPluginKubenet"), out var __jsonAllowNetworkPluginKubenet) ? (bool?)__jsonAllowNetworkPluginKubenet : AllowNetworkPluginKubenet;} + {_userAssignedIdentity = If( json?.PropertyT("userAssignedIdentities"), out var __jsonUserAssignedIdentities) ? If( __jsonUserAssignedIdentities as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentity.FromJson(__u) )) ))() : null : UserAssignedIdentity;} + {_userAssignedIdentityException = If( json?.PropertyT("userAssignedIdentityExceptions"), out var __jsonUserAssignedIdentityExceptions) ? If( __jsonUserAssignedIdentityExceptions as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __q) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityException.FromJson(__p) )) ))() : null : UserAssignedIdentityException;} + 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 ); + AddIf( null != this._allowNetworkPluginKubenet ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._allowNetworkPluginKubenet) : null, "allowNetworkPluginKubenet" ,container.Add ); + if (null != this._userAssignedIdentity) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._userAssignedIdentity ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("userAssignedIdentities",__w); + } + if (null != this._userAssignedIdentityException) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __s in this._userAssignedIdentityException ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("userAssignedIdentityExceptions",__r); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.PowerShell.cs new file mode 100644 index 000000000000..2a6247e81c96 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.PowerShell.cs @@ -0,0 +1,181 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// An error response from the pod identity provisioning. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityProvisioningErrorTypeConverter))] + public partial class ManagedClusterPodIdentityProvisioningError + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningError DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterPodIdentityProvisioningError(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.Api20230201.IManagedClusterPodIdentityProvisioningError DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterPodIdentityProvisioningError(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.Api20230201.IManagedClusterPodIdentityProvisioningError 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 ManagedClusterPodIdentityProvisioningError(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.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterPodIdentityProvisioningError(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.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.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(); + } + /// An error response from the pod identity provisioning. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityProvisioningErrorTypeConverter))] + public partial interface IManagedClusterPodIdentityProvisioningError + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.TypeConverter.cs new file mode 100644 index 000000000000..7829bd398441 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterPodIdentityProvisioningErrorTypeConverter : 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.Api20230201.IManagedClusterPodIdentityProvisioningError ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterPodIdentityProvisioningError.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityProvisioningError.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityProvisioningError.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.cs new file mode 100644 index 000000000000..c99e6aff801e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// An error response from the pod identity provisioning. + public partial class ManagedClusterPodIdentityProvisioningError : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal + { + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)Error).Detail = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody _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.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBody()); 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.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)Error).Message = value ?? null; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBody()); 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.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)Error).Target = value ?? null; } + + /// + /// Creates an new instance. + /// + public ManagedClusterPodIdentityProvisioningError() + { + + } + } + /// An error response from the pod identity provisioning. + public partial interface IManagedClusterPodIdentityProvisioningError : + 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, + 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, + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] 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, + 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, + 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 pod identity provisioning. + internal partial interface IManagedClusterPodIdentityProvisioningErrorInternal + + { + /// + /// 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. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] Detail { get; set; } + /// Details about the error. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody 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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.json.cs new file mode 100644 index 000000000000..587d7d50c23c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningError.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// An error response from the pod identity provisioning. + public partial class ManagedClusterPodIdentityProvisioningError + { + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningError. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPodIdentityProvisioningError(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 ManagedClusterPodIdentityProvisioningError(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.Api20230201.ManagedClusterPodIdentityProvisioningErrorBody.FromJson(__jsonError) : Error;} + 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._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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.PowerShell.cs new file mode 100644 index 000000000000..ce84ae78afe4 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// An error response from the pod identity provisioning. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter))] + public partial class ManagedClusterPodIdentityProvisioningErrorBody + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterPodIdentityProvisioningErrorBody(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.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterPodIdentityProvisioningErrorBody(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.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody 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 ManagedClusterPodIdentityProvisioningErrorBody(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterPodIdentityProvisioningErrorBody(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.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(); + } + /// An error response from the pod identity provisioning. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter))] + public partial interface IManagedClusterPodIdentityProvisioningErrorBody + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.TypeConverter.cs new file mode 100644 index 000000000000..f84147ad8cf0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter : 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.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterPodIdentityProvisioningErrorBody.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityProvisioningErrorBody.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityProvisioningErrorBody.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.cs new file mode 100644 index 000000000000..ec2840a9d78e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// An error response from the pod identity provisioning. + public partial class ManagedClusterPodIdentityProvisioningErrorBody : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBodyInternal + { + + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] _detail; + + /// A list of additional details about the error. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] 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 ManagedClusterPodIdentityProvisioningErrorBody() + { + + } + } + /// An error response from the pod identity provisioning. + public partial interface IManagedClusterPodIdentityProvisioningErrorBody : + 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, + 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, + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] 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, + 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, + 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 pod identity provisioning. + internal partial interface IManagedClusterPodIdentityProvisioningErrorBodyInternal + + { + /// + /// 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. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] 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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.json.cs new file mode 100644 index 000000000000..160355bfcfba --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningErrorBody.json.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// An error response from the pod identity provisioning. + public partial class ManagedClusterPodIdentityProvisioningErrorBody + { + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPodIdentityProvisioningErrorBody(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 ManagedClusterPodIdentityProvisioningErrorBody(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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBody.FromJson(__u) )) ))() : null : Detail;} + 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._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) + { + 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); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.PowerShell.cs new file mode 100644 index 000000000000..ab34004b453e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.PowerShell.cs @@ -0,0 +1,187 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityProvisioningInfoTypeConverter))] + public partial class ManagedClusterPodIdentityProvisioningInfo + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningInfo DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterPodIdentityProvisioningInfo(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.Api20230201.IManagedClusterPodIdentityProvisioningInfo DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterPodIdentityProvisioningInfo(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.Api20230201.IManagedClusterPodIdentityProvisioningInfo 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 ManagedClusterPodIdentityProvisioningInfo(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.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorTypeConverter.ConvertFrom); + } + if (content.Contains("ManagedClusterPodIdentityProvisioningErrorBodyError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).ManagedClusterPodIdentityProvisioningErrorBodyError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) content.GetValueForProperty("ManagedClusterPodIdentityProvisioningErrorBodyError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).ManagedClusterPodIdentityProvisioningErrorBodyError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal ManagedClusterPodIdentityProvisioningInfo(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.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Error = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError) content.GetValueForProperty("Error",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Error, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorTypeConverter.ConvertFrom); + } + if (content.Contains("ManagedClusterPodIdentityProvisioningErrorBodyError")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).ManagedClusterPodIdentityProvisioningErrorBodyError = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) content.GetValueForProperty("ManagedClusterPodIdentityProvisioningErrorBodyError",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).ManagedClusterPodIdentityProvisioningErrorBodyError, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.ConvertFrom); + } + if (content.Contains("Code")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Code = (string) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Code, global::System.Convert.ToString); + } + if (content.Contains("Message")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Message = (string) content.GetValueForProperty("Message",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Message, global::System.Convert.ToString); + } + if (content.Contains("Target")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Target = (string) content.GetValueForProperty("Target",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Target, global::System.Convert.ToString); + } + if (content.Contains("Detail")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Detail = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[]) content.GetValueForProperty("Detail",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal)this).Detail, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningErrorBodyTypeConverter.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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPodIdentityProvisioningInfoTypeConverter))] + public partial interface IManagedClusterPodIdentityProvisioningInfo + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.TypeConverter.cs new file mode 100644 index 000000000000..e5dbccb9ee7d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterPodIdentityProvisioningInfoTypeConverter : 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.Api20230201.IManagedClusterPodIdentityProvisioningInfo ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfo).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterPodIdentityProvisioningInfo.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityProvisioningInfo.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterPodIdentityProvisioningInfo.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.cs new file mode 100644 index 000000000000..9eb70e98cdb1 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + public partial class ManagedClusterPodIdentityProvisioningInfo : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfo, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal + { + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] Detail { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Detail; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Detail = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError _error; + + /// Pod identity assignment error (if any). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningError()); 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.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Message; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Message = value ?? null; } + + /// Internal Acessors for Error + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal.Error { get => (this._error = this._error ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProvisioningError()); set { {_error = value;} } } + + /// Internal Acessors for ManagedClusterPodIdentityProvisioningErrorBodyError + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfoInternal.ManagedClusterPodIdentityProvisioningErrorBodyError { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Error; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)Error).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.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Target; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorInternal)Error).Target = value ?? null; } + + /// + /// Creates an new instance. + /// + public ManagedClusterPodIdentityProvisioningInfo() + { + + } + } + public partial interface IManagedClusterPodIdentityProvisioningInfo : + 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, + 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, + Description = @"A list of additional details about the error.", + SerializedName = @"details", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] 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, + 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, + 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; } + + } + internal partial interface IManagedClusterPodIdentityProvisioningInfoInternal + + { + /// + /// 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. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody[] Detail { get; set; } + /// Pod identity assignment error (if any). + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningError Error { get; set; } + /// Details about the error. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningErrorBody ManagedClusterPodIdentityProvisioningErrorBodyError { 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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.json.cs new file mode 100644 index 000000000000..00b820a86a42 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPodIdentityProvisioningInfo.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + public partial class ManagedClusterPodIdentityProvisioningInfo + { + + /// + /// 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.Api20230201.IManagedClusterPodIdentityProvisioningInfo. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfo. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProvisioningInfo FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPodIdentityProvisioningInfo(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 ManagedClusterPodIdentityProvisioningInfo(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.Api20230201.ManagedClusterPodIdentityProvisioningError.FromJson(__jsonError) : Error;} + 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._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/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.PowerShell.cs similarity index 81% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.PowerShell.cs index f4c235fc0d6a..1a493e262caf 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterPoolUpgradeProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterPoolUpgradeProfile(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterPoolUpgradeProfile(content); } @@ -87,10 +87,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile 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. @@ -105,25 +105,25 @@ internal ManagedClusterPoolUpgradeProfile(global::System.Collections.IDictionary // actually deserialize if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("OSType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); } if (content.Contains("Upgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.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. @@ -138,19 +138,19 @@ internal ManagedClusterPoolUpgradeProfile(global::System.Management.Automation.P // actually deserialize if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("OSType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); } if (content.Contains("Upgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).Upgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("Upgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)this).Upgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.TypeConverter.cs index 6b77e39eca3e..b15436f9ef04 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.cs similarity index 74% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.cs index 69ff7f04103a..ba41aa306e47 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.cs @@ -3,45 +3,43 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// The list of available upgrade versions. public partial class ManagedClusterPoolUpgradeProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal { /// Backing field for property. private string _kubernetesVersion; - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string KubernetesVersion { get => this._kubernetesVersion; set => this._kubernetesVersion = value; } /// Backing field for property. private string _name; - /// Pool name. + /// The Agent Pool 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType _oSType; - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType OSType { get => this._oSType; set => this._oSType = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[] _upgrade; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[] _upgrade; /// List of orchestrator types and versions available for upgrade. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[] Upgrade { get => this._upgrade; set => this._upgrade = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[] Upgrade { get => this._upgrade; set => this._upgrade = value; } /// Creates an new instance. public ManagedClusterPoolUpgradeProfile() @@ -53,29 +51,27 @@ public ManagedClusterPoolUpgradeProfile() public partial interface IManagedClusterPoolUpgradeProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Kubernetes version (major, minor, patch).", + Description = @"The Kubernetes version (major.minor.patch).", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] string KubernetesVersion { get; set; } - /// Pool name. + /// The Agent Pool name. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Pool name.", + Description = @"The Agent Pool name.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.", + Description = @"The operating system type. The default is Linux.", SerializedName = @"osType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType OSType { get; set; } @@ -85,24 +81,22 @@ public partial interface IManagedClusterPoolUpgradeProfile : ReadOnly = false, Description = @"List of orchestrator types and versions available for upgrade.", SerializedName = @"upgrades", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[] Upgrade { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[] Upgrade { get; set; } } /// The list of available upgrade versions. internal partial interface IManagedClusterPoolUpgradeProfileInternal { - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). string KubernetesVersion { get; set; } - /// Pool name. + /// The Agent Pool name. string Name { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType OSType { get; set; } /// List of orchestrator types and versions available for upgrade. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[] Upgrade { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[] Upgrade { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.json.cs index a48e5368ec1d..191c31f95fb9 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterPoolUpgradeProfile 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.Api20200901.IManagedClusterPoolUpgradeProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPoolUpgradeProfile(json) : null; } @@ -80,7 +80,7 @@ internal ManagedClusterPoolUpgradeProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks {_kubernetesVersion = If( json?.PropertyT("kubernetesVersion"), out var __jsonKubernetesVersion) ? (string)__jsonKubernetesVersion : (string)KubernetesVersion;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} {_oSType = If( json?.PropertyT("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType;} - {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileUpgradesItem.FromJson(__u) )) ))() : null : Upgrade;} + {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileUpgradesItem.FromJson(__u) )) ))() : null : Upgrade;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.PowerShell.cs similarity index 88% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.PowerShell.cs index a71828f18b72..8c3695cc4611 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -54,29 +54,29 @@ public partial class ManagedClusterPoolUpgradeProfileUpgradesItem partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterPoolUpgradeProfileUpgradesItem(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterPoolUpgradeProfileUpgradesItem(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem 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. @@ -107,17 +107,17 @@ internal ManagedClusterPoolUpgradeProfileUpgradesItem(global::System.Collections // actually deserialize if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("IsPreview")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } 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. @@ -132,11 +132,11 @@ internal ManagedClusterPoolUpgradeProfileUpgradesItem(global::System.Management. // actually deserialize if (content.Contains("KubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).KubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).KubernetesVersion, global::System.Convert.ToString); } if (content.Contains("IsPreview")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).IsPreview = (bool?) content.GetValueForProperty("IsPreview",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItemInternal)this).IsPreview, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.TypeConverter.cs index 93df951da610..da88782efade 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.cs similarity index 73% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.cs index cff4251114df..4ff404a65fc6 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.cs @@ -3,26 +3,26 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; public partial class ManagedClusterPoolUpgradeProfileUpgradesItem : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItemInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItemInternal { /// Backing field for property. private bool? _isPreview; - /// Whether Kubernetes version is currently in preview. + /// Whether the Kubernetes version is currently in preview. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public bool? IsPreview { get => this._isPreview; set => this._isPreview = value; } /// Backing field for property. private string _kubernetesVersion; - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string KubernetesVersion { get => this._kubernetesVersion; set => this._kubernetesVersion = value; } @@ -37,19 +37,19 @@ public ManagedClusterPoolUpgradeProfileUpgradesItem() public partial interface IManagedClusterPoolUpgradeProfileUpgradesItem : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// Whether Kubernetes version is currently in preview. + /// Whether the Kubernetes version is currently in preview. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Whether Kubernetes version is currently in preview.", + Description = @"Whether the Kubernetes version is currently in preview.", SerializedName = @"isPreview", PossibleTypes = new [] { typeof(bool) })] bool? IsPreview { get; set; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Kubernetes version (major, minor, patch).", + Description = @"The Kubernetes version (major.minor.patch).", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] string KubernetesVersion { get; set; } @@ -58,9 +58,9 @@ public partial interface IManagedClusterPoolUpgradeProfileUpgradesItem : internal partial interface IManagedClusterPoolUpgradeProfileUpgradesItemInternal { - /// Whether Kubernetes version is currently in preview. + /// Whether the Kubernetes version is currently in preview. bool? IsPreview { get; set; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). string KubernetesVersion { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.json.cs index 73b200486b31..b693b218e7eb 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPoolUpgradeProfileUpgradesItem.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPoolUpgradeProfileUpgradesItem.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -53,13 +53,13 @@ public partial class ManagedClusterPoolUpgradeProfileUpgradesItem 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.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPoolUpgradeProfileUpgradesItem(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.PowerShell.cs new file mode 100644 index 000000000000..77c1b72124e4 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.PowerShell.cs @@ -0,0 +1,1080 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Properties of the managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPropertiesTypeConverter))] + public partial class ManagedClusterProperties + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterProperties(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.Api20230201.IManagedClusterProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterProperties(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.Api20230201.IManagedClusterProperties 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 ManagedClusterProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerStateTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile) content.GetValueForProperty("LinuxProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceLinuxProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWindowsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ServicePrincipalProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile) content.GetValueForProperty("ServicePrincipalProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterServicePrincipalProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PodIdentityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile) content.GetValueForProperty("PodIdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterOidcIssuerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AadProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAadProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AutoUpgradeProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoUpgradeProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile) content.GetValueForProperty("AutoUpgradeProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoUpgradeProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAutoUpgradeProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AutoScalerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ApiServerAccessProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile) content.GetValueForProperty("ApiServerAccessProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterApiServerAccessProfileTypeConverter.ConvertFrom); + } + if (content.Contains("HttpProxyConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig) content.GetValueForProperty("HttpProxyConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterHttpProxyConfigTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadAutoScalerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile) content.GetValueForProperty("WorkloadAutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AzureMonitorProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureMonitorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile) content.GetValueForProperty("AzureMonitorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureMonitorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("MaxAgentPool")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MaxAgentPool = (int?) content.GetValueForProperty("MaxAgentPool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MaxAgentPool, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("CurrentKubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).CurrentKubernetesVersion = (string) content.GetValueForProperty("CurrentKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).CurrentKubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("DnsPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DnsPrefix, global::System.Convert.ToString); + } + if (content.Contains("FqdnSubdomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).FqdnSubdomain = (string) content.GetValueForProperty("FqdnSubdomain",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).FqdnSubdomain, global::System.Convert.ToString); + } + if (content.Contains("Fqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).Fqdn, global::System.Convert.ToString); + } + if (content.Contains("PrivateFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PrivateFqdn = (string) content.GetValueForProperty("PrivateFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PrivateFqdn, global::System.Convert.ToString); + } + if (content.Contains("AzurePortalFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzurePortalFqdn = (string) content.GetValueForProperty("AzurePortalFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzurePortalFqdn, global::System.Convert.ToString); + } + if (content.Contains("AgentPoolProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("AddonProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AddonProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles) content.GetValueForProperty("AddonProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AddonProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAddonProfilesTypeConverter.ConvertFrom); + } + if (content.Contains("NodeResourceGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).NodeResourceGroup = (string) content.GetValueForProperty("NodeResourceGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).NodeResourceGroup, global::System.Convert.ToString); + } + if (content.Contains("EnableRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnablePodSecurityPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("IdentityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).IdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile) content.GetValueForProperty("IdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).IdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesIdentityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[]) content.GetValueForProperty("PrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PrivateLinkResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DisableLocalAccount = (bool?) content.GetValueForProperty("DisableLocalAccount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DisableLocalAccount, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess.CreateFrom); + } + if (content.Contains("NetworkProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PowerStateCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + } + if (content.Contains("WindowProfileLicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); + } + if (content.Contains("AutoUpgradeProfileUpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileUpgradeChannel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel?) content.GetValueForProperty("AutoUpgradeProfileUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileUpgradeChannel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel.CreateFrom); + } + if (content.Contains("AutoScalerProfileExpander")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); + } + if (content.Contains("LinuxProfileSsh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxProfileAdminUsername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfileAdminUsername = (string) content.GetValueForProperty("LinuxProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfileAdminUsername, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileGmsaProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileGmsaProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile) content.GetValueForProperty("WindowProfileGmsaProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileGmsaProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowProfileAdminUsername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileAdminUsername = (string) content.GetValueForProperty("WindowProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileAdminUsername, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileAdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileAdminPassword = (string) content.GetValueForProperty("WindowProfileAdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileAdminPassword, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileEnableCsiProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileEnableCsiProxy = (bool?) content.GetValueForProperty("WindowProfileEnableCsiProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileEnableCsiProxy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ServicePrincipalProfileClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileClientId = (string) content.GetValueForProperty("ServicePrincipalProfileClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalProfileSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileSecret = (string) content.GetValueForProperty("ServicePrincipalProfileSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileSecret, global::System.Convert.ToString); + } + if (content.Contains("PodIdentityProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileEnabled = (bool?) content.GetValueForProperty("PodIdentityProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PodIdentityProfileAllowNetworkPluginKubenet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileAllowNetworkPluginKubenet = (bool?) content.GetValueForProperty("PodIdentityProfileAllowNetworkPluginKubenet",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileAllowNetworkPluginKubenet, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PodIdentityProfileUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[]) content.GetValueForProperty("PodIdentityProfileUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileUserAssignedIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("PodIdentityProfileUserAssignedIdentityException")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileUserAssignedIdentityException = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[]) content.GetValueForProperty("PodIdentityProfileUserAssignedIdentityException",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileUserAssignedIdentityException, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionTypeConverter.ConvertFrom)); + } + if (content.Contains("OidcIssuerProfileIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("OidcIssuerProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileManaged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileManaged = (bool?) content.GetValueForProperty("AadProfileManaged",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileManaged, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileEnableAzureRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileAdminGroupObjectID")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AadProfileClientAppId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileClientAppId, global::System.Convert.ToString); + } + if (content.Contains("AadProfileServerAppId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileServerAppId, global::System.Convert.ToString); + } + if (content.Contains("AadProfileServerAppSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileServerAppSecret = (string) content.GetValueForProperty("AadProfileServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileServerAppSecret, global::System.Convert.ToString); + } + if (content.Contains("AadProfileTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxGracefulTerminationSec")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxGracefulTerminationSec = (string) content.GetValueForProperty("AutoScalerProfileMaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxGracefulTerminationSec, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxNodeProvisionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxNodeProvisionTime = (string) content.GetValueForProperty("AutoScalerProfileMaxNodeProvisionTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxNodeProvisionTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxTotalUnreadyPercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage = (string) content.GetValueForProperty("AutoScalerProfileMaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileNewPodScaleUpDelay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileNewPodScaleUpDelay = (string) content.GetValueForProperty("AutoScalerProfileNewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileNewPodScaleUpDelay, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileOkTotalUnreadyCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileOkTotalUnreadyCount = (string) content.GetValueForProperty("AutoScalerProfileOkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileOkTotalUnreadyCount, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScanInterval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScanInterval = (string) content.GetValueForProperty("AutoScalerProfileScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScanInterval, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterAdd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterAdd = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterAdd, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterDelete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterDelete = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterDelete, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterFailure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterFailure = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterFailure, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUnneededTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnneededTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnneededTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUnreadyTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnreadyTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnreadyTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUtilizationThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUtilizationThreshold = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUtilizationThreshold, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileSkipNodesWithLocalStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithLocalStorage = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithLocalStorage, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileSkipNodesWithSystemPod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithSystemPod = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithSystemPod, global::System.Convert.ToString); + } + if (content.Contains("ApiServerAccessProfileAuthorizedIPRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileAuthorizedIPRange = (string[]) content.GetValueForProperty("ApiServerAccessProfileAuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileAuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ApiServerAccessProfileEnablePrivateCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateCluster = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfilePrivateDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfilePrivateDnsZone = (string) content.GetValueForProperty("ApiServerAccessProfilePrivateDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfilePrivateDnsZone, global::System.Convert.ToString); + } + if (content.Contains("ApiServerAccessProfileEnablePrivateClusterPublicFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateClusterPublicFqdn = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateClusterPublicFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateClusterPublicFqdn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfileDisableRunCommand")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileDisableRunCommand = (bool?) content.GetValueForProperty("ApiServerAccessProfileDisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileDisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("HttpProxyConfigHttpProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpProxy, global::System.Convert.ToString); + } + if (content.Contains("HttpProxyConfigHttpsProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpsProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpsProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpsProxy, global::System.Convert.ToString); + } + if (content.Contains("HttpProxyConfigNoProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigNoProxy = (string[]) content.GetValueForProperty("HttpProxyConfigNoProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigNoProxy, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("HttpProxyConfigTrustedCa")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigTrustedCa = (string) content.GetValueForProperty("HttpProxyConfigTrustedCa",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigTrustedCa, global::System.Convert.ToString); + } + if (content.Contains("SecurityProfileDefender")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileDefender = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender) content.GetValueForProperty("SecurityProfileDefender",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileDefender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileAzureKeyVaultKm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileAzureKeyVaultKm = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms) content.GetValueForProperty("SecurityProfileAzureKeyVaultKm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileAzureKeyVaultKm, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKmsTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileWorkloadIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileImageCleaner")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("SecurityProfileImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); + } + if (content.Contains("AzureKeyVaultKmKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); + } + if (content.Contains("StorageProfileDiskCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileDiskCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver) content.GetValueForProperty("StorageProfileDiskCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileDiskCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileFileCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileFileCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver) content.GetValueForProperty("StorageProfileFileCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileFileCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileSnapshotController")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileSnapshotController = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController) content.GetValueForProperty("StorageProfileSnapshotController",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileSnapshotController, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotControllerTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileBlobCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileBlobCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver) content.GetValueForProperty("StorageProfileBlobCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileBlobCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadAutoScalerProfileKeda")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileKeda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("WorkloadAutoScalerProfileKeda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileKeda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); + } + if (content.Contains("AzureMonitorProfileMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureMonitorProfileMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics) content.GetValueForProperty("AzureMonitorProfileMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureMonitorProfileMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); + } + if (content.Contains("GmsaProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileEnabled = (bool?) content.GetValueForProperty("GmsaProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GmsaProfileDnsServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileDnsServer = (string) content.GetValueForProperty("GmsaProfileDnsServer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileDnsServer, global::System.Convert.ToString); + } + if (content.Contains("GmsaProfileRootDomainName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileRootDomainName = (string) content.GetValueForProperty("GmsaProfileRootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileRootDomainName, global::System.Convert.ToString); + } + if (content.Contains("DefenderSecurityMonitoring")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DefenderSecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("DefenderSecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DefenderSecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); + } + if (content.Contains("DefenderLogAnalyticsWorkspaceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DefenderLogAnalyticsWorkspaceResourceId = (string) content.GetValueForProperty("DefenderLogAnalyticsWorkspaceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DefenderLogAnalyticsWorkspaceResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureKeyVaultKmEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmEnabled = (bool?) content.GetValueForProperty("AzureKeyVaultKmEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AzureKeyVaultKmKeyVaultNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes?) content.GetValueForProperty("AzureKeyVaultKmKeyVaultNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes.CreateFrom); + } + if (content.Contains("AzureKeyVaultKmKeyVaultResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyVaultResourceId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyVaultResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyVaultResourceId, global::System.Convert.ToString); + } + if (content.Contains("WorkloadIdentityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ImageCleanerEnabled = (bool?) content.GetValueForProperty("ImageCleanerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ImageCleanerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerIntervalHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ImageCleanerIntervalHour = (int?) content.GetValueForProperty("ImageCleanerIntervalHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ImageCleanerIntervalHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DiskCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DiskCsiDriverEnabled = (bool?) content.GetValueForProperty("DiskCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DiskCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("FileCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).FileCsiDriverEnabled = (bool?) content.GetValueForProperty("FileCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).FileCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SnapshotControllerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SnapshotControllerEnabled = (bool?) content.GetValueForProperty("SnapshotControllerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SnapshotControllerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BlobCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).BlobCsiDriverEnabled = (bool?) content.GetValueForProperty("BlobCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).BlobCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KedaEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KedaEnabled = (bool) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KedaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MetricKubeStateMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MetricKubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("MetricKubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MetricKubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("MetricEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MetricEnabled = (bool) content.GetValueForProperty("MetricEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MetricEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeStateMetricLabelsAllowlist")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); + } + if (content.Contains("KubeStateMetricAnnotationsAllowList")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubeStateMetricAnnotationsAllowList, 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 ManagedClusterProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("PowerState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PowerState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState) content.GetValueForProperty("PowerState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PowerState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerStateTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile) content.GetValueForProperty("LinuxProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceLinuxProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowsProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowsProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile) content.GetValueForProperty("WindowsProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowsProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWindowsProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ServicePrincipalProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile) content.GetValueForProperty("ServicePrincipalProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterServicePrincipalProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PodIdentityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile) content.GetValueForProperty("PodIdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("OidcIssuerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile) content.GetValueForProperty("OidcIssuerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterOidcIssuerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AadProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile) content.GetValueForProperty("AadProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAadProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AutoUpgradeProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoUpgradeProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile) content.GetValueForProperty("AutoUpgradeProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoUpgradeProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAutoUpgradeProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AutoScalerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile) content.GetValueForProperty("AutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAutoScalerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ApiServerAccessProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile) content.GetValueForProperty("ApiServerAccessProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterApiServerAccessProfileTypeConverter.ConvertFrom); + } + if (content.Contains("HttpProxyConfig")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfig = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig) content.GetValueForProperty("HttpProxyConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfig, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterHttpProxyConfigTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile) content.GetValueForProperty("SecurityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile) content.GetValueForProperty("StorageProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadAutoScalerProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile) content.GetValueForProperty("WorkloadAutoScalerProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AzureMonitorProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureMonitorProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile) content.GetValueForProperty("AzureMonitorProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureMonitorProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileTypeConverter.ConvertFrom); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("MaxAgentPool")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MaxAgentPool = (int?) content.GetValueForProperty("MaxAgentPool",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MaxAgentPool, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("CurrentKubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).CurrentKubernetesVersion = (string) content.GetValueForProperty("CurrentKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).CurrentKubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("DnsPrefix")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DnsPrefix = (string) content.GetValueForProperty("DnsPrefix",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DnsPrefix, global::System.Convert.ToString); + } + if (content.Contains("FqdnSubdomain")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).FqdnSubdomain = (string) content.GetValueForProperty("FqdnSubdomain",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).FqdnSubdomain, global::System.Convert.ToString); + } + if (content.Contains("Fqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).Fqdn = (string) content.GetValueForProperty("Fqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).Fqdn, global::System.Convert.ToString); + } + if (content.Contains("PrivateFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PrivateFqdn = (string) content.GetValueForProperty("PrivateFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PrivateFqdn, global::System.Convert.ToString); + } + if (content.Contains("AzurePortalFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzurePortalFqdn = (string) content.GetValueForProperty("AzurePortalFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzurePortalFqdn, global::System.Convert.ToString); + } + if (content.Contains("AgentPoolProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfileTypeConverter.ConvertFrom)); + } + if (content.Contains("AddonProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AddonProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles) content.GetValueForProperty("AddonProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AddonProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAddonProfilesTypeConverter.ConvertFrom); + } + if (content.Contains("NodeResourceGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).NodeResourceGroup = (string) content.GetValueForProperty("NodeResourceGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).NodeResourceGroup, global::System.Convert.ToString); + } + if (content.Contains("EnableRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).EnableRbac = (bool?) content.GetValueForProperty("EnableRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).EnableRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("EnablePodSecurityPolicy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy = (bool?) content.GetValueForProperty("EnablePodSecurityPolicy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).EnablePodSecurityPolicy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("DiskEncryptionSetId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DiskEncryptionSetId = (string) content.GetValueForProperty("DiskEncryptionSetId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DiskEncryptionSetId, global::System.Convert.ToString); + } + if (content.Contains("IdentityProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).IdentityProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile) content.GetValueForProperty("IdentityProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).IdentityProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesIdentityProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PrivateLinkResource")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PrivateLinkResource = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[]) content.GetValueForProperty("PrivateLinkResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PrivateLinkResource, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkResourceTypeConverter.ConvertFrom)); + } + if (content.Contains("DisableLocalAccount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DisableLocalAccount = (bool?) content.GetValueForProperty("DisableLocalAccount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DisableLocalAccount, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PublicNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PublicNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess?) content.GetValueForProperty("PublicNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PublicNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess.CreateFrom); + } + if (content.Contains("NetworkProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).NetworkProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile) content.GetValueForProperty("NetworkProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).NetworkProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceNetworkProfileTypeConverter.ConvertFrom); + } + if (content.Contains("PowerStateCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PowerStateCode = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("PowerStateCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PowerStateCode, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + } + if (content.Contains("WindowProfileLicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("WindowProfileLicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileLicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); + } + if (content.Contains("AutoUpgradeProfileUpgradeChannel")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileUpgradeChannel = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel?) content.GetValueForProperty("AutoUpgradeProfileUpgradeChannel",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoUpgradeProfileUpgradeChannel, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel.CreateFrom); + } + if (content.Contains("AutoScalerProfileExpander")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("AutoScalerProfileExpander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileExpander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); + } + if (content.Contains("LinuxProfileSsh")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfileSsh = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration) content.GetValueForProperty("LinuxProfileSsh",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfileSsh, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshConfigurationTypeConverter.ConvertFrom); + } + if (content.Contains("LinuxProfileAdminUsername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfileAdminUsername = (string) content.GetValueForProperty("LinuxProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).LinuxProfileAdminUsername, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileGmsaProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileGmsaProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile) content.GetValueForProperty("WindowProfileGmsaProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileGmsaProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfileTypeConverter.ConvertFrom); + } + if (content.Contains("WindowProfileAdminUsername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileAdminUsername = (string) content.GetValueForProperty("WindowProfileAdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileAdminUsername, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileAdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileAdminPassword = (string) content.GetValueForProperty("WindowProfileAdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileAdminPassword, global::System.Convert.ToString); + } + if (content.Contains("WindowProfileEnableCsiProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileEnableCsiProxy = (bool?) content.GetValueForProperty("WindowProfileEnableCsiProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WindowProfileEnableCsiProxy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ServicePrincipalProfileClientId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileClientId = (string) content.GetValueForProperty("ServicePrincipalProfileClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileClientId, global::System.Convert.ToString); + } + if (content.Contains("ServicePrincipalProfileSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileSecret = (string) content.GetValueForProperty("ServicePrincipalProfileSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ServicePrincipalProfileSecret, global::System.Convert.ToString); + } + if (content.Contains("PodIdentityProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileEnabled = (bool?) content.GetValueForProperty("PodIdentityProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PodIdentityProfileAllowNetworkPluginKubenet")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileAllowNetworkPluginKubenet = (bool?) content.GetValueForProperty("PodIdentityProfileAllowNetworkPluginKubenet",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileAllowNetworkPluginKubenet, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("PodIdentityProfileUserAssignedIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileUserAssignedIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[]) content.GetValueForProperty("PodIdentityProfileUserAssignedIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileUserAssignedIdentity, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityTypeConverter.ConvertFrom)); + } + if (content.Contains("PodIdentityProfileUserAssignedIdentityException")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileUserAssignedIdentityException = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[]) content.GetValueForProperty("PodIdentityProfileUserAssignedIdentityException",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).PodIdentityProfileUserAssignedIdentityException, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityExceptionTypeConverter.ConvertFrom)); + } + if (content.Contains("OidcIssuerProfileIssuerUrl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl = (string) content.GetValueForProperty("OidcIssuerProfileIssuerUrl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfileIssuerUrl, global::System.Convert.ToString); + } + if (content.Contains("OidcIssuerProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfileEnabled = (bool?) content.GetValueForProperty("OidcIssuerProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).OidcIssuerProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileManaged")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileManaged = (bool?) content.GetValueForProperty("AadProfileManaged",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileManaged, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileEnableAzureRbac")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileEnableAzureRbac = (bool?) content.GetValueForProperty("AadProfileEnableAzureRbac",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileEnableAzureRbac, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AadProfileAdminGroupObjectID")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID = (string[]) content.GetValueForProperty("AadProfileAdminGroupObjectID",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileAdminGroupObjectID, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("AadProfileClientAppId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileClientAppId = (string) content.GetValueForProperty("AadProfileClientAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileClientAppId, global::System.Convert.ToString); + } + if (content.Contains("AadProfileServerAppId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileServerAppId = (string) content.GetValueForProperty("AadProfileServerAppId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileServerAppId, global::System.Convert.ToString); + } + if (content.Contains("AadProfileServerAppSecret")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileServerAppSecret = (string) content.GetValueForProperty("AadProfileServerAppSecret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileServerAppSecret, global::System.Convert.ToString); + } + if (content.Contains("AadProfileTenantId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileTenantId = (string) content.GetValueForProperty("AadProfileTenantId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AadProfileTenantId, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileBalanceSimilarNodeGroup")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup = (string) content.GetValueForProperty("AutoScalerProfileBalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileBalanceSimilarNodeGroup, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxEmptyBulkDelete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete = (string) content.GetValueForProperty("AutoScalerProfileMaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxEmptyBulkDelete, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxGracefulTerminationSec")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxGracefulTerminationSec = (string) content.GetValueForProperty("AutoScalerProfileMaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxGracefulTerminationSec, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxNodeProvisionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxNodeProvisionTime = (string) content.GetValueForProperty("AutoScalerProfileMaxNodeProvisionTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxNodeProvisionTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileMaxTotalUnreadyPercentage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage = (string) content.GetValueForProperty("AutoScalerProfileMaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileMaxTotalUnreadyPercentage, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileNewPodScaleUpDelay")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileNewPodScaleUpDelay = (string) content.GetValueForProperty("AutoScalerProfileNewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileNewPodScaleUpDelay, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileOkTotalUnreadyCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileOkTotalUnreadyCount = (string) content.GetValueForProperty("AutoScalerProfileOkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileOkTotalUnreadyCount, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScanInterval")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScanInterval = (string) content.GetValueForProperty("AutoScalerProfileScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScanInterval, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterAdd")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterAdd = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterAdd, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterDelete")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterDelete = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterDelete, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownDelayAfterFailure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterFailure = (string) content.GetValueForProperty("AutoScalerProfileScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownDelayAfterFailure, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUnneededTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnneededTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnneededTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUnreadyTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnreadyTime = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUnreadyTime, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileScaleDownUtilizationThreshold")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUtilizationThreshold = (string) content.GetValueForProperty("AutoScalerProfileScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileScaleDownUtilizationThreshold, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileSkipNodesWithLocalStorage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithLocalStorage = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithLocalStorage, global::System.Convert.ToString); + } + if (content.Contains("AutoScalerProfileSkipNodesWithSystemPod")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithSystemPod = (string) content.GetValueForProperty("AutoScalerProfileSkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AutoScalerProfileSkipNodesWithSystemPod, global::System.Convert.ToString); + } + if (content.Contains("ApiServerAccessProfileAuthorizedIPRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileAuthorizedIPRange = (string[]) content.GetValueForProperty("ApiServerAccessProfileAuthorizedIPRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileAuthorizedIPRange, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("ApiServerAccessProfileEnablePrivateCluster")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateCluster = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateCluster",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateCluster, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfilePrivateDnsZone")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfilePrivateDnsZone = (string) content.GetValueForProperty("ApiServerAccessProfilePrivateDnsZone",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfilePrivateDnsZone, global::System.Convert.ToString); + } + if (content.Contains("ApiServerAccessProfileEnablePrivateClusterPublicFqdn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateClusterPublicFqdn = (bool?) content.GetValueForProperty("ApiServerAccessProfileEnablePrivateClusterPublicFqdn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileEnablePrivateClusterPublicFqdn, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ApiServerAccessProfileDisableRunCommand")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileDisableRunCommand = (bool?) content.GetValueForProperty("ApiServerAccessProfileDisableRunCommand",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ApiServerAccessProfileDisableRunCommand, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("HttpProxyConfigHttpProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpProxy, global::System.Convert.ToString); + } + if (content.Contains("HttpProxyConfigHttpsProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpsProxy = (string) content.GetValueForProperty("HttpProxyConfigHttpsProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigHttpsProxy, global::System.Convert.ToString); + } + if (content.Contains("HttpProxyConfigNoProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigNoProxy = (string[]) content.GetValueForProperty("HttpProxyConfigNoProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigNoProxy, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + } + if (content.Contains("HttpProxyConfigTrustedCa")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigTrustedCa = (string) content.GetValueForProperty("HttpProxyConfigTrustedCa",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).HttpProxyConfigTrustedCa, global::System.Convert.ToString); + } + if (content.Contains("SecurityProfileDefender")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileDefender = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender) content.GetValueForProperty("SecurityProfileDefender",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileDefender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileAzureKeyVaultKm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileAzureKeyVaultKm = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms) content.GetValueForProperty("SecurityProfileAzureKeyVaultKm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileAzureKeyVaultKm, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKmsTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileWorkloadIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity) content.GetValueForProperty("SecurityProfileWorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileWorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("SecurityProfileImageCleaner")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("SecurityProfileImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityProfileImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); + } + if (content.Contains("AzureKeyVaultKmKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); + } + if (content.Contains("StorageProfileDiskCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileDiskCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver) content.GetValueForProperty("StorageProfileDiskCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileDiskCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileFileCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileFileCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver) content.GetValueForProperty("StorageProfileFileCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileFileCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileSnapshotController")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileSnapshotController = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController) content.GetValueForProperty("StorageProfileSnapshotController",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileSnapshotController, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotControllerTypeConverter.ConvertFrom); + } + if (content.Contains("StorageProfileBlobCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileBlobCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver) content.GetValueForProperty("StorageProfileBlobCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).StorageProfileBlobCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadAutoScalerProfileKeda")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileKeda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("WorkloadAutoScalerProfileKeda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadAutoScalerProfileKeda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); + } + if (content.Contains("AzureMonitorProfileMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureMonitorProfileMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics) content.GetValueForProperty("AzureMonitorProfileMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureMonitorProfileMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("SshPublicKey")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SshPublicKey = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[]) content.GetValueForProperty("SshPublicKey",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SshPublicKey, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceSshPublicKeyTypeConverter.ConvertFrom)); + } + if (content.Contains("GmsaProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileEnabled = (bool?) content.GetValueForProperty("GmsaProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GmsaProfileDnsServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileDnsServer = (string) content.GetValueForProperty("GmsaProfileDnsServer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileDnsServer, global::System.Convert.ToString); + } + if (content.Contains("GmsaProfileRootDomainName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileRootDomainName = (string) content.GetValueForProperty("GmsaProfileRootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).GmsaProfileRootDomainName, global::System.Convert.ToString); + } + if (content.Contains("DefenderSecurityMonitoring")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DefenderSecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("DefenderSecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DefenderSecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); + } + if (content.Contains("DefenderLogAnalyticsWorkspaceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DefenderLogAnalyticsWorkspaceResourceId = (string) content.GetValueForProperty("DefenderLogAnalyticsWorkspaceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DefenderLogAnalyticsWorkspaceResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureKeyVaultKmEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmEnabled = (bool?) content.GetValueForProperty("AzureKeyVaultKmEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AzureKeyVaultKmKeyVaultNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes?) content.GetValueForProperty("AzureKeyVaultKmKeyVaultNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes.CreateFrom); + } + if (content.Contains("AzureKeyVaultKmKeyVaultResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyVaultResourceId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyVaultResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).AzureKeyVaultKmKeyVaultResourceId, global::System.Convert.ToString); + } + if (content.Contains("WorkloadIdentityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ImageCleanerEnabled = (bool?) content.GetValueForProperty("ImageCleanerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ImageCleanerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerIntervalHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ImageCleanerIntervalHour = (int?) content.GetValueForProperty("ImageCleanerIntervalHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).ImageCleanerIntervalHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("DiskCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DiskCsiDriverEnabled = (bool?) content.GetValueForProperty("DiskCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).DiskCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("FileCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).FileCsiDriverEnabled = (bool?) content.GetValueForProperty("FileCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).FileCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SnapshotControllerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SnapshotControllerEnabled = (bool?) content.GetValueForProperty("SnapshotControllerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SnapshotControllerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BlobCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).BlobCsiDriverEnabled = (bool?) content.GetValueForProperty("BlobCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).BlobCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KedaEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KedaEnabled = (bool) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KedaEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("MetricKubeStateMetric")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MetricKubeStateMetric = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics) content.GetValueForProperty("MetricKubeStateMetric",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MetricKubeStateMetric, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfileKubeStateMetricsTypeConverter.ConvertFrom); + } + if (content.Contains("MetricEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MetricEnabled = (bool) content.GetValueForProperty("MetricEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).MetricEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SecurityMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).SecurityMonitoringEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("KubeStateMetricLabelsAllowlist")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubeStateMetricLabelsAllowlist = (string) content.GetValueForProperty("KubeStateMetricLabelsAllowlist",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubeStateMetricLabelsAllowlist, global::System.Convert.ToString); + } + if (content.Contains("KubeStateMetricAnnotationsAllowList")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubeStateMetricAnnotationsAllowList = (string) content.GetValueForProperty("KubeStateMetricAnnotationsAllowList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal)this).KubeStateMetricAnnotationsAllowList, 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(); + } + /// Properties of the managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterPropertiesTypeConverter))] + public partial interface IManagedClusterProperties + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.TypeConverter.cs index f1264bd63fd2..9409da8c1c45 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.cs new file mode 100644 index 000000000000..d9fb6792820f --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.cs @@ -0,0 +1,1974 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Properties of the managed cluster. + public partial class ManagedClusterProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile _aadProfile; + + /// The Azure Active Directory configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAadProfile()); set => this._aadProfile = value; } + + /// The list of AAD group object IDs that will have admin role of the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string[] AadProfileAdminGroupObjectID { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).AdminGroupObjectID; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).AdminGroupObjectID = value ?? null /* arrayOf */; } + + /// + /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AadProfileClientAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).ClientAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).ClientAppId = value ?? null; } + + /// Whether to enable Azure RBAC for Kubernetes authorization. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AadProfileEnableAzureRbac { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).EnableAzureRbac; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).EnableAzureRbac = value ?? default(bool); } + + /// Whether to enable managed AAD. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AadProfileManaged { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).Managed; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).Managed = value ?? default(bool); } + + /// + /// (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AadProfileServerAppId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).ServerAppId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).ServerAppId = value ?? null; } + + /// + /// (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AadProfileServerAppSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).ServerAppSecret; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).ServerAppSecret = value ?? null; } + + /// + /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AadProfileTenantId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).TenantId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfileInternal)AadProfile).TenantId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles _addonProfile; + + /// The profile of managed cluster add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles AddonProfile { get => (this._addonProfile = this._addonProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAddonProfiles()); set => this._addonProfile = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[] _agentPoolProfile; + + /// The agent pool properties. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get => this._agentPoolProfile; set => this._agentPoolProfile = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile _apiServerAccessProfile; + + /// The access profile for managed cluster API server. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile ApiServerAccessProfile { get => (this._apiServerAccessProfile = this._apiServerAccessProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string[] ApiServerAccessProfileAuthorizedIPRange { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).AuthorizedIPRange; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).AuthorizedIPRange = value ?? null /* arrayOf */; } + + /// Whether to disable run command for the cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? ApiServerAccessProfileDisableRunCommand { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).DisableRunCommand; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).DisableRunCommand = value ?? default(bool); } + + /// + /// 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.Api20230201.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnablePrivateCluster; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnablePrivateCluster = value ?? default(bool); } + + /// Whether to create additional public FQDN for private cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? ApiServerAccessProfileEnablePrivateClusterPublicFqdn { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).EnablePrivateClusterPublicFqdn; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// 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.Api20230201.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).PrivateDnsZone; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfileInternal)ApiServerAccessProfile).PrivateDnsZone = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile _autoScalerProfile; + + /// Parameters to be applied to the cluster-autoscaler when enabled + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get => (this._autoScalerProfile = this._autoScalerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAutoScalerProfile()); set => this._autoScalerProfile = value; } + + /// 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.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).BalanceSimilarNodeGroup; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).Expander; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).Expander = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander)""); } + + /// 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.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxEmptyBulkDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxEmptyBulkDelete = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxGracefulTerminationSec; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileMaxNodeProvisionTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxNodeProvisionTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxNodeProvisionTime = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).MaxTotalUnreadyPercentage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileNewPodScaleUpDelay { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).NewPodScaleUpDelay; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).NewPodScaleUpDelay = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).OkTotalUnreadyCount; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileScaleDownDelayAfterAdd { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterAdd; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileScaleDownDelayAfterDelete { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterDelete; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileScaleDownDelayAfterFailure { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownDelayAfterFailure; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileScaleDownUnneededTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnneededTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AutoScalerProfileScaleDownUnreadyTime { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnreadyTime; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUnreadyTime = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUtilizationThreshold; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScaleDownUtilizationThreshold = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScanInterval; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).ScanInterval = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithLocalStorage; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithLocalStorage = value ?? null; } + + /// 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.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithSystemPod; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)AutoScalerProfile).SkipNodesWithSystemPod = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile _autoUpgradeProfile; + + /// The auto upgrade configuration. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile AutoUpgradeProfile { get => (this._autoUpgradeProfile = this._autoUpgradeProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel? AutoUpgradeProfileUpgradeChannel { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfileInternal)AutoUpgradeProfile).UpgradeChannel; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfileInternal)AutoUpgradeProfile).UpgradeChannel = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel)""); } + + /// Whether to enable Azure Key Vault key management service. The default is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AzureKeyVaultKmEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmEnabled = value ?? default(bool); } + + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AzureKeyVaultKmKeyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmKeyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? AzureKeyVaultKmKeyVaultNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmKeyVaultNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmKeyVaultNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes)""); } + + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AzureKeyVaultKmKeyVaultResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmKeyVaultResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKmKeyVaultResourceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile _azureMonitorProfile; + + /// Azure Monitor addon profiles for monitoring the managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile AzureMonitorProfile { get => (this._azureMonitorProfile = this._azureMonitorProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfile()); set => this._azureMonitorProfile = value; } + + /// Backing field for property. + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string AzurePortalFqdn { get => this._azurePortalFqdn; } + + /// Whether to enable AzureBlob CSI Driver. The default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? BlobCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).BlobCsiDriverEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).BlobCsiDriverEnabled = 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string CurrentKubernetesVersion { get => this._currentKubernetesVersion; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string DefenderLogAnalyticsWorkspaceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).DefenderLogAnalyticsWorkspaceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).DefenderLogAnalyticsWorkspaceResourceId = value ?? null; } + + /// Backing field for property. + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? DisableLocalAccount { get => this._disableLocalAccount; set => this._disableLocalAccount = value; } + + /// Whether to enable AzureDisk CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? DiskCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).DiskCsiDriverEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).DiskCsiDriverEnabled = value ?? default(bool); } + + /// Backing field for property. + private string _diskEncryptionSetId; + + /// + /// 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; } + + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnablePodSecurityPolicy { get => this._enablePodSecurityPolicy; set => this._enablePodSecurityPolicy = value; } + + /// Backing field for property. + private bool? _enableRbac; + + /// Whether to enable Kubernetes Role-Based Access Control. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnableRbac { get => this._enableRbac; set => this._enableRbac = value; } + + /// Whether to enable AzureFile CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? FileCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).FileCsiDriverEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).FileCsiDriverEnabled = value ?? default(bool); } + + /// Backing field for property. + private string _fqdn; + + /// The FQDN of the master pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Fqdn { get => this._fqdn; } + + /// Backing field for property. + private string _fqdnSubdomain; + + /// 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; } + + /// + /// 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string GmsaProfileDnsServer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfileDnsServer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfileDnsServer = value ?? null; } + + /// 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.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfileEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfileEnabled = value ?? default(bool); } + + /// + /// Specifies the root domain name 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string GmsaProfileRootDomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfileRootDomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfileRootDomainName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig _httpProxyConfig; + + /// Configurations for provisioning the cluster with HTTP proxy servers. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig HttpProxyConfig { get => (this._httpProxyConfig = this._httpProxyConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterHttpProxyConfig()); set => this._httpProxyConfig = value; } + + /// The HTTP proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string HttpProxyConfigHttpProxy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)HttpProxyConfig).HttpProxy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)HttpProxyConfig).HttpProxy = value ?? null; } + + /// The HTTPS proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string HttpProxyConfigHttpsProxy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)HttpProxyConfig).HttpsProxy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)HttpProxyConfig).HttpsProxy = value ?? null; } + + /// The endpoints that should not go through proxy. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string[] HttpProxyConfigNoProxy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)HttpProxyConfig).NoProxy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)HttpProxyConfig).NoProxy = value ?? null /* arrayOf */; } + + /// Alternative CA cert to use for connecting to proxy servers. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string HttpProxyConfigTrustedCa { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)HttpProxyConfig).TrustedCa; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfigInternal)HttpProxyConfig).TrustedCa = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile _identityProfile; + + /// Identities associated with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile IdentityProfile { get => (this._identityProfile = this._identityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesIdentityProfile()); set => this._identityProfile = value; } + + /// 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.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleanerEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleanerEnabled = value ?? default(bool); } + + /// Image Cleaner scanning interval in hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? ImageCleanerIntervalHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleanerIntervalHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleanerIntervalHour = value ?? default(int); } + + /// 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.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).KedaEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).KedaEnabled = value ?? default(bool); } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeStateMetricAnnotationsAllowList { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).KubeStateMetricAnnotationsAllowList; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).KubeStateMetricAnnotationsAllowList = value ?? null; } + + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubeStateMetricLabelsAllowlist { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).KubeStateMetricLabelsAllowlist; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).KubeStateMetricLabelsAllowlist = value ?? null; } + + /// Backing field for property. + 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) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string KubernetesVersion { get => this._kubernetesVersion; set => this._kubernetesVersion = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile _linuxProfile; + + /// The profile for Linux VMs in the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile LinuxProfile { get => (this._linuxProfile = this._linuxProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceLinuxProfile()); set => this._linuxProfile = value; } + + /// The administrator username to use for Linux VMs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string LinuxProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)LinuxProfile).AdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)LinuxProfile).AdminUsername = value ?? null; } + + /// Backing field for property. + private int? _maxAgentPool; + + /// The max number of agent pools for the managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? MaxAgentPool { get => this._maxAgentPool; } + + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? MetricEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).MetricEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).MetricEnabled = value ?? default(bool); } + + /// Internal Acessors for AadProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.AadProfile { get => (this._aadProfile = this._aadProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAadProfile()); set { {_aadProfile = value;} } } + + /// Internal Acessors for ApiServerAccessProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterApiServerAccessProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.ApiServerAccessProfile { get => (this._apiServerAccessProfile = this._apiServerAccessProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterApiServerAccessProfile()); set { {_apiServerAccessProfile = value;} } } + + /// Internal Acessors for AutoScalerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.AutoScalerProfile { get => (this._autoScalerProfile = this._autoScalerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAutoScalerProfile()); set { {_autoScalerProfile = value;} } } + + /// Internal Acessors for AutoUpgradeProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAutoUpgradeProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.AutoUpgradeProfile { get => (this._autoUpgradeProfile = this._autoUpgradeProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAutoUpgradeProfile()); set { {_autoUpgradeProfile = value;} } } + + /// Internal Acessors for AzureMonitorProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.AzureMonitorProfile { get => (this._azureMonitorProfile = this._azureMonitorProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfile()); set { {_azureMonitorProfile = value;} } } + + /// Internal Acessors for AzureMonitorProfileMetric + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.AzureMonitorProfileMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).Metric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).Metric = value; } + + /// Internal Acessors for AzurePortalFqdn + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.AzurePortalFqdn { get => this._azurePortalFqdn; set { {_azurePortalFqdn = value;} } } + + /// Internal Acessors for CurrentKubernetesVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.CurrentKubernetesVersion { get => this._currentKubernetesVersion; set { {_currentKubernetesVersion = value;} } } + + /// Internal Acessors for DefenderSecurityMonitoring + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.DefenderSecurityMonitoring { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).DefenderSecurityMonitoring; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).DefenderSecurityMonitoring = value; } + + /// Internal Acessors for Fqdn + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.Fqdn { get => this._fqdn; set { {_fqdn = value;} } } + + /// Internal Acessors for HttpProxyConfig + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.HttpProxyConfig { get => (this._httpProxyConfig = this._httpProxyConfig ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterHttpProxyConfig()); set { {_httpProxyConfig = value;} } } + + /// Internal Acessors for LinuxProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.LinuxProfile { get => (this._linuxProfile = this._linuxProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceLinuxProfile()); set { {_linuxProfile = value;} } } + + /// Internal Acessors for LinuxProfileSsh + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.LinuxProfileSsh { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)LinuxProfile).Ssh; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)LinuxProfile).Ssh = value; } + + /// Internal Acessors for MaxAgentPool + int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.MaxAgentPool { get => this._maxAgentPool; set { {_maxAgentPool = value;} } } + + /// Internal Acessors for MetricKubeStateMetric + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.MetricKubeStateMetric { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).MetricKubeStateMetric; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileInternal)AzureMonitorProfile).MetricKubeStateMetric = value; } + + /// Internal Acessors for OidcIssuerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.OidcIssuerProfile { get => (this._oidcIssuerProfile = this._oidcIssuerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterOidcIssuerProfile()); set { {_oidcIssuerProfile = value;} } } + + /// Internal Acessors for OidcIssuerProfileIssuerUrl + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl = value; } + + /// Internal Acessors for PodIdentityProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.PodIdentityProfile { get => (this._podIdentityProfile = this._podIdentityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProfile()); set { {_podIdentityProfile = value;} } } + + /// Internal Acessors for PowerState + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerState()); set { {_powerState = value;} } } + + /// Internal Acessors for PrivateFqdn + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.PrivateFqdn { get => this._privateFqdn; set { {_privateFqdn = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + + /// Internal Acessors for SecurityProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfile()); set { {_securityProfile = value;} } } + + /// Internal Acessors for SecurityProfileAzureKeyVaultKm + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.SecurityProfileAzureKeyVaultKm { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKm; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).AzureKeyVaultKm = value; } + + /// Internal Acessors for SecurityProfileDefender + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.SecurityProfileDefender { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).Defender; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).Defender = value; } + + /// Internal Acessors for SecurityProfileImageCleaner + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.SecurityProfileImageCleaner { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleaner; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).ImageCleaner = value; } + + /// Internal Acessors for SecurityProfileWorkloadIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.SecurityProfileWorkloadIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).WorkloadIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).WorkloadIdentity = value; } + + /// Internal Acessors for ServicePrincipalProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.ServicePrincipalProfile { get => (this._servicePrincipalProfile = this._servicePrincipalProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterServicePrincipalProfile()); set { {_servicePrincipalProfile = value;} } } + + /// Internal Acessors for StorageProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfile()); set { {_storageProfile = value;} } } + + /// Internal Acessors for StorageProfileBlobCsiDriver + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.StorageProfileBlobCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).BlobCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).BlobCsiDriver = value; } + + /// Internal Acessors for StorageProfileDiskCsiDriver + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.StorageProfileDiskCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).DiskCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).DiskCsiDriver = value; } + + /// Internal Acessors for StorageProfileFileCsiDriver + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.StorageProfileFileCsiDriver { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).FileCsiDriver; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).FileCsiDriver = value; } + + /// Internal Acessors for StorageProfileSnapshotController + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.StorageProfileSnapshotController { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).SnapshotController; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).SnapshotController = value; } + + /// Internal Acessors for WindowProfileGmsaProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.WindowProfileGmsaProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).GmsaProfile = value; } + + /// Internal Acessors for WindowsProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.WindowsProfile { get => (this._windowsProfile = this._windowsProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWindowsProfile()); set { {_windowsProfile = value;} } } + + /// Internal Acessors for WorkloadAutoScalerProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.WorkloadAutoScalerProfile { get => (this._workloadAutoScalerProfile = this._workloadAutoScalerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfile()); set { {_workloadAutoScalerProfile = value;} } } + + /// Internal Acessors for WorkloadAutoScalerProfileKeda + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesInternal.WorkloadAutoScalerProfileKeda { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).Keda; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)WorkloadAutoScalerProfile).Keda = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile _networkProfile; + + /// The network configuration profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile NetworkProfile { get => (this._networkProfile = this._networkProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceNetworkProfile()); set => this._networkProfile = value; } + + /// Backing field for property. + private string _nodeResourceGroup; + + /// The name of the resource group containing agent pool nodes. + [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.Api20230201.IManagedClusterOidcIssuerProfile _oidcIssuerProfile; + + /// The OIDC issuer profile of the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile OidcIssuerProfile { get => (this._oidcIssuerProfile = this._oidcIssuerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterOidcIssuerProfile()); set => this._oidcIssuerProfile = value; } + + /// 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.Api20230201.IManagedClusterOidcIssuerProfileInternal)OidcIssuerProfile).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)OidcIssuerProfile).Enabled = value ?? default(bool); } + + /// The OIDC issuer url of the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string OidcIssuerProfileIssuerUrl { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfileInternal)OidcIssuerProfile).IssuerUrl; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfile PodIdentityProfile { get => (this._podIdentityProfile = this._podIdentityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? PodIdentityProfileAllowNetworkPluginKubenet { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)PodIdentityProfile).AllowNetworkPluginKubenet; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)PodIdentityProfile).AllowNetworkPluginKubenet = value ?? default(bool); } + + /// Whether the pod identity addon is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? PodIdentityProfileEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)PodIdentityProfile).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)PodIdentityProfile).Enabled = value ?? default(bool); } + + /// The pod identities to use in the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[] PodIdentityProfileUserAssignedIdentity { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)PodIdentityProfile).UserAssignedIdentity; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)PodIdentityProfile).UserAssignedIdentity = value ?? null /* arrayOf */; } + + /// The pod identity exceptions to allow. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[] PodIdentityProfileUserAssignedIdentityException { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)PodIdentityProfile).UserAssignedIdentityException; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityProfileInternal)PodIdentityProfile).UserAssignedIdentityException = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState _powerState; + + /// The Power State of the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState PowerState { get => (this._powerState = this._powerState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerState()); } + + /// Tells whether the cluster is Running or Stopped + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerStateInternal)PowerState).Code; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerStateInternal)PowerState).Code = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code)""); } + + /// Backing field for property. + private string _privateFqdn; + + /// The FQDN of private cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string PrivateFqdn { get => this._privateFqdn; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] _privateLinkResource; + + /// Private link resources associated with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] PrivateLinkResource { get => this._privateLinkResource; set => this._privateLinkResource = value; } + + /// Backing field for property. + private string _provisioningState; + + /// The current provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ProvisioningState { get => this._provisioningState; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess? _publicNetworkAccess; + + /// Allow or deny public network access for AKS + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess? PublicNetworkAccess { get => this._publicNetworkAccess; set => this._publicNetworkAccess = value; } + + /// 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.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).SecurityMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).SecurityMonitoringEnabled = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile _securityProfile; + + /// Security 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.Api20230201.IManagedClusterSecurityProfile SecurityProfile { get => (this._securityProfile = this._securityProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfile()); set => this._securityProfile = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile _servicePrincipalProfile; + + /// + /// Information about a service principal identity for the cluster to use for manipulating Azure APIs. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile ServicePrincipalProfile { get => (this._servicePrincipalProfile = this._servicePrincipalProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterServicePrincipalProfile()); set => this._servicePrincipalProfile = value; } + + /// 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.Api20230201.IManagedClusterServicePrincipalProfileInternal)ServicePrincipalProfile).ClientId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)ServicePrincipalProfile).ClientId = value ?? null; } + + /// The secret password associated with the service principal in plain text. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string ServicePrincipalProfileSecret { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)ServicePrincipalProfile).Secret; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)ServicePrincipalProfile).Secret = value ?? null; } + + /// Whether to enable Snapshot Controller. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? SnapshotControllerEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).SnapshotControllerEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)StorageProfile).SnapshotControllerEnabled = value ?? default(bool); } + + /// + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] SshPublicKey { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)LinuxProfile).SshPublicKey; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfileInternal)LinuxProfile).SshPublicKey = value ?? null /* arrayOf */; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile _storageProfile; + + /// Storage 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.Api20230201.IManagedClusterStorageProfile StorageProfile { get => (this._storageProfile = this._storageProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfile()); set => this._storageProfile = value; } + + /// + /// 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:** + /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string WindowProfileAdminPassword { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).AdminPassword; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).AdminPassword = value ?? null; } + + /// + /// Specifies the name of the administrator account.

**Restriction:** Cannot end in "."

**Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string WindowProfileAdminUsername { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).AdminUsername; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).AdminUsername = value ?? null; } + + /// + /// 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.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).EnableCsiProxy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).EnableCsiProxy = value ?? default(bool); } + + /// + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).LicenseType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)WindowsProfile).LicenseType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile _windowsProfile; + + /// The profile for Windows VMs in the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile WindowsProfile { get => (this._windowsProfile = this._windowsProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWindowsProfile()); set => this._windowsProfile = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile _workloadAutoScalerProfile; + + /// Workload Auto-scaler 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.Api20230201.IManagedClusterWorkloadAutoScalerProfile WorkloadAutoScalerProfile { get => (this._workloadAutoScalerProfile = this._workloadAutoScalerProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfile()); set => this._workloadAutoScalerProfile = value; } + + /// Whether to enable workload identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? WorkloadIdentityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).WorkloadIdentityEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)SecurityProfile).WorkloadIdentityEnabled = value ?? default(bool); } + + /// Creates an new instance. + public ManagedClusterProperties() + { + + } + } + /// Properties of the managed cluster. + public partial interface IManagedClusterProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The list of AAD group object IDs that will have admin role of the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of AAD group object IDs that will have admin role of the cluster.", + SerializedName = @"adminGroupObjectIDs", + PossibleTypes = new [] { typeof(string) })] + string[] AadProfileAdminGroupObjectID { get; set; } + /// + /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"(DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy.", + SerializedName = @"clientAppID", + PossibleTypes = new [] { typeof(string) })] + string AadProfileClientAppId { get; set; } + /// Whether to enable Azure RBAC for Kubernetes authorization. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Azure RBAC for Kubernetes authorization.", + SerializedName = @"enableAzureRBAC", + PossibleTypes = new [] { typeof(bool) })] + bool? AadProfileEnableAzureRbac { get; set; } + /// Whether to enable managed AAD. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable managed AAD.", + SerializedName = @"managed", + PossibleTypes = new [] { typeof(bool) })] + bool? AadProfileManaged { get; set; } + /// + /// (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"(DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy.", + SerializedName = @"serverAppID", + PossibleTypes = new [] { typeof(string) })] + string AadProfileServerAppId { get; set; } + /// + /// (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"(DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy.", + SerializedName = @"serverAppSecret", + PossibleTypes = new [] { typeof(string) })] + string AadProfileServerAppSecret { get; set; } + /// + /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription.", + SerializedName = @"tenantID", + PossibleTypes = new [] { typeof(string) })] + string AadProfileTenantId { get; set; } + /// The profile of managed cluster add-on. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The profile of managed cluster add-on.", + SerializedName = @"addonProfiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles AddonProfile { get; set; } + /// The agent pool properties. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The agent pool properties.", + SerializedName = @"agentPoolProfiles", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[] 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"authorizedIPRanges", + PossibleTypes = new [] { typeof(string) })] + string[] ApiServerAccessProfileAuthorizedIPRange { get; set; } + /// Whether to disable run command for the cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to disable run command for the cluster or not.", + SerializedName = @"disableRunCommand", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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; } + /// Whether to create additional public FQDN for private cluster or not. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to create additional public FQDN for private cluster or not.", + SerializedName = @"enablePrivateClusterPublicFQDN", + 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). + /// Allowed values are 'system' and 'none'. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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'.", + SerializedName = @"privateDNSZone", + PossibleTypes = new [] { typeof(string) })] + string ApiServerAccessProfilePrivateDnsZone { get; set; } + /// Valid values are 'true' and 'false' + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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) + /// for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get; set; } + /// The default is 10. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The default is 10.", + SerializedName = @"max-empty-bulk-delete", + PossibleTypes = new [] { typeof(string) })] + string AutoScalerProfileMaxEmptyBulkDelete { get; set; } + /// The default is 600. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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", + PossibleTypes = new [] { typeof(string) })] + string AutoScalerProfileMaxNodeProvisionTime { get; set; } + /// The default is 45. The maximum is 100 and the minimum is 0. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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; } + /// + /// 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, + 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).", + SerializedName = @"new-pod-scale-up-delay", + PossibleTypes = new [] { typeof(string) })] + string AutoScalerProfileNewPodScaleUpDelay { get; set; } + /// This must be an integer. The default is 3. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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'. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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( + Required = false, + ReadOnly = false, + Description = @"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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel? AutoUpgradeProfileUpgradeChannel { get; set; } + /// Whether to enable Azure Key Vault key management service. The default is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Azure Key Vault key management service. The default is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? AzureKeyVaultKmEnabled { get; set; } + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty.", + SerializedName = @"keyId", + 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`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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`.", + SerializedName = @"keyVaultNetworkAccess", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? AzureKeyVaultKmKeyVaultNetworkAccess { get; set; } + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty.", + SerializedName = @"keyVaultResourceId", + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + 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.", + SerializedName = @"azurePortalFQDN", + PossibleTypes = new [] { typeof(string) })] + string AzurePortalFqdn { get; } + /// Whether to enable AzureBlob CSI Driver. The default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureBlob CSI Driver. The default value is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? BlobCsiDriverEnabled { 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + 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.", + SerializedName = @"currentKubernetesVersion", + PossibleTypes = new [] { typeof(string) })] + string CurrentKubernetesVersion { get; } + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"logAnalyticsWorkspaceResourceId", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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).", + SerializedName = @"disableLocalAccounts", + PossibleTypes = new [] { typeof(bool) })] + bool? DisableLocalAccount { get; set; } + /// Whether to enable AzureDisk CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureDisk CSI Driver. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DiskCsiDriverEnabled { get; set; } + /// + /// This is of the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/diskEncryptionSets/{encryptionSetName}' + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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, + 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, + ReadOnly = false, + Description = @"Whether to enable Kubernetes Role-Based Access Control.", + SerializedName = @"enableRBAC", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableRbac { get; set; } + /// Whether to enable AzureFile CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureFile CSI Driver. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? FileCsiDriverEnabled { get; set; } + /// The FQDN of the master pool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The FQDN of the master pool.", + SerializedName = @"fqdn", + PossibleTypes = new [] { typeof(string) })] + string Fqdn { get; } + /// This cannot be updated once the Managed Cluster has been created. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This cannot be updated once the Managed Cluster has been created.", + SerializedName = @"fqdnSubdomain", + PossibleTypes = new [] { typeof(string) })] + 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"dnsServer", + PossibleTypes = new [] { typeof(string) })] + string GmsaProfileDnsServer { get; set; } + /// Specifies whether to enable Windows gMSA in the managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether to enable Windows gMSA in the managed cluster.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + 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 + /// vnet which is used to create the managed cluster. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the root domain name 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.", + SerializedName = @"rootDomainName", + PossibleTypes = new [] { typeof(string) })] + string GmsaProfileRootDomainName { get; set; } + /// The HTTP proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The HTTP proxy server endpoint to use.", + SerializedName = @"httpProxy", + PossibleTypes = new [] { typeof(string) })] + string HttpProxyConfigHttpProxy { get; set; } + /// The HTTPS proxy server endpoint to use. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The HTTPS proxy server endpoint to use.", + SerializedName = @"httpsProxy", + PossibleTypes = new [] { typeof(string) })] + string HttpProxyConfigHttpsProxy { get; set; } + /// The endpoints that should not go through proxy. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The endpoints that should not go through proxy.", + SerializedName = @"noProxy", + PossibleTypes = new [] { typeof(string) })] + string[] HttpProxyConfigNoProxy { get; set; } + /// Alternative CA cert to use for connecting to proxy servers. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Alternative CA cert to use for connecting to proxy servers.", + SerializedName = @"trustedCa", + PossibleTypes = new [] { typeof(string) })] + string HttpProxyConfigTrustedCa { get; set; } + /// Identities associated with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identities associated with the cluster.", + SerializedName = @"identityProfile", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } + /// Whether to enable Image Cleaner on AKS cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Image Cleaner on AKS cluster.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? ImageCleanerEnabled { get; set; } + /// Image Cleaner scanning interval in hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image Cleaner scanning interval in hours.", + SerializedName = @"intervalHours", + PossibleTypes = new [] { typeof(int) })] + int? ImageCleanerIntervalHour { get; set; } + /// Whether to enable KEDA. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable KEDA.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? KedaEnabled { 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"metricAnnotationsAllowList", + PossibleTypes = new [] { typeof(string) })] + string KubeStateMetricAnnotationsAllowList { get; set; } + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). By default the metric contains only resource name and namespace labels.", + SerializedName = @"metricLabelsAllowlist", + 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) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"kubernetesVersion", + PossibleTypes = new [] { typeof(string) })] + string KubernetesVersion { get; set; } + /// The administrator username to use for Linux VMs. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The administrator username to use for Linux VMs.", + SerializedName = @"adminUsername", + PossibleTypes = new [] { typeof(string) })] + string LinuxProfileAdminUsername { get; set; } + /// The max number of agent pools for the managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The max number of agent pools for the managed cluster.", + SerializedName = @"maxAgentPools", + PossibleTypes = new [] { typeof(int) })] + int? MaxAgentPool { get; } + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable for details on enabling and disabling.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? MetricEnabled { get; set; } + /// The network configuration profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The network configuration profile.", + SerializedName = @"networkProfile", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile NetworkProfile { get; set; } + /// The name of the resource group containing agent pool nodes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The name of the resource group containing agent pool nodes.", + SerializedName = @"nodeResourceGroup", + PossibleTypes = new [] { typeof(string) })] + string NodeResourceGroup { get; set; } + /// Whether the OIDC issuer is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the OIDC issuer is enabled.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? OidcIssuerProfileEnabled { get; set; } + /// The OIDC issuer url of the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The OIDC issuer url of the Managed Cluster.", + SerializedName = @"issuerURL", + 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) + /// for more information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"allowNetworkPluginKubenet", + PossibleTypes = new [] { typeof(bool) })] + bool? PodIdentityProfileAllowNetworkPluginKubenet { get; set; } + /// Whether the pod identity addon is enabled. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether the pod identity addon is enabled.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? PodIdentityProfileEnabled { get; set; } + /// The pod identities to use in the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The pod identities to use in the cluster.", + SerializedName = @"userAssignedIdentities", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[] PodIdentityProfileUserAssignedIdentity { get; set; } + /// The pod identity exceptions to allow. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The pod identity exceptions to allow.", + SerializedName = @"userAssignedIdentityExceptions", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[] PodIdentityProfileUserAssignedIdentityException { get; set; } + /// Tells whether the cluster is Running or Stopped + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Tells whether the cluster is Running or Stopped", + SerializedName = @"code", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } + /// The FQDN of private cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The FQDN of private cluster.", + SerializedName = @"privateFQDN", + PossibleTypes = new [] { typeof(string) })] + string PrivateFqdn { get; } + /// Private link resources associated with the cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Private link resources associated with the cluster.", + SerializedName = @"privateLinkResources", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] PrivateLinkResource { get; set; } + /// The current provisioning state. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The current provisioning state.", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// Allow or deny public network access for AKS + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Allow or deny public network access for AKS", + SerializedName = @"publicNetworkAccess", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + /// Whether to enable Defender threat detection + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Defender threat detection", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityMonitoringEnabled { get; set; } + /// The ID for the service principal. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The ID for the service principal.", + SerializedName = @"clientId", + PossibleTypes = new [] { typeof(string) })] + string ServicePrincipalProfileClientId { get; set; } + /// The secret password associated with the service principal in plain text. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The secret password associated with the service principal in plain text.", + SerializedName = @"secret", + PossibleTypes = new [] { typeof(string) })] + string ServicePrincipalProfileSecret { get; set; } + /// Whether to enable Snapshot Controller. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Snapshot Controller. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? SnapshotControllerEnabled { get; set; } + /// + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified.", + SerializedName = @"publicKeys", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] SshPublicKey { 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:** + /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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:** ""abc@123"", ""P@$$w0rd"", ""P@ssw0rd"", ""P@ssword123"", ""Pa$$word"", ""pass@word1"", ""Password!"", ""Password1"", ""Password22"", ""iloveyou!""", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(string) })] + string WindowProfileAdminPassword { get; set; } + /// + /// Specifies the name of the administrator account.

**Restriction:** Cannot end in "."

**Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the name of the administrator account.

**Restriction:** Cannot end in "".""

**Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

**Minimum-length:** 1 character

**Max-length:** 20 characters", + SerializedName = @"adminUsername", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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; } + /// + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details.", + SerializedName = @"licenseType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get; set; } + /// Whether to enable workload identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable workload identity.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? WorkloadIdentityEnabled { get; set; } + + } + /// Properties of the managed cluster. + internal partial interface IManagedClusterPropertiesInternal + + { + /// The Azure Active Directory configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAadProfile AadProfile { get; set; } + /// The list of AAD group object IDs that will have admin role of the cluster. + string[] AadProfileAdminGroupObjectID { get; set; } + /// + /// (DEPRECATED) The client AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + string AadProfileClientAppId { get; set; } + /// Whether to enable Azure RBAC for Kubernetes authorization. + bool? AadProfileEnableAzureRbac { get; set; } + /// Whether to enable managed AAD. + bool? AadProfileManaged { get; set; } + /// + /// (DEPRECATED) The server AAD application ID. Learn more at https://aka.ms/aks/aad-legacy. + /// + string AadProfileServerAppId { get; set; } + /// + /// (DEPRECATED) The server AAD application secret. Learn more at https://aka.ms/aks/aad-legacy. + /// + string AadProfileServerAppSecret { get; set; } + /// + /// The AAD tenant ID to use for authentication. If not specified, will use the tenant of the deployment subscription. + /// + string AadProfileTenantId { get; set; } + /// The profile of managed cluster add-on. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles AddonProfile { get; set; } + /// The agent pool properties. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile[] AgentPoolProfile { get; set; } + /// The access profile for managed cluster API server. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + string[] 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). + /// + 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). + /// Allowed values are 'system' and 'none'. + /// + string ApiServerAccessProfilePrivateDnsZone { get; set; } + /// Parameters to be applied to the cluster-autoscaler when enabled + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile AutoScalerProfile { get; set; } + /// 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) + /// for more information. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? AutoScalerProfileExpander { get; set; } + /// The default is 10. + string AutoScalerProfileMaxEmptyBulkDelete { get; set; } + /// 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. + /// + string AutoScalerProfileMaxNodeProvisionTime { get; set; } + /// 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). + /// + string AutoScalerProfileNewPodScaleUpDelay { get; set; } + /// 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. + /// + 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. + /// + 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. + /// + 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. + /// + 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. + /// + string AutoScalerProfileScaleDownUnreadyTime { get; set; } + /// The default is '0.5'. + string AutoScalerProfileScaleDownUtilizationThreshold { get; set; } + /// The default is '10'. Values must be an integer number of seconds. + string AutoScalerProfileScanInterval { get; set; } + /// The default is true. + string AutoScalerProfileSkipNodesWithLocalStorage { get; set; } + /// The default is true. + string AutoScalerProfileSkipNodesWithSystemPod { get; set; } + /// The auto upgrade configuration. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel? AutoUpgradeProfileUpgradeChannel { get; set; } + /// Whether to enable Azure Key Vault key management service. The default is false. + bool? AzureKeyVaultKmEnabled { get; set; } + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + 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`. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? AzureKeyVaultKmKeyVaultNetworkAccess { get; set; } + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + string AzureKeyVaultKmKeyVaultResourceId { get; set; } + /// Azure Monitor addon profiles for monitoring the managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfile AzureMonitorProfile { get; set; } + /// + /// Metrics profile for the Azure Monitor managed service for Prometheus addon. Collect out-of-the-box Kubernetes infrastructure + /// metrics to send to an Azure Monitor Workspace and configure additional scraping for custom targets. See aka.ms/AzureManagedPrometheus + /// for an overview. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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. + /// + string AzurePortalFqdn { get; set; } + /// Whether to enable AzureBlob CSI Driver. The default value is false. + bool? BlobCsiDriverEnabled { 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. + /// + string CurrentKubernetesVersion { 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. + /// + string DefenderLogAnalyticsWorkspaceResourceId { get; set; } + /// + /// Microsoft Defender threat detection for Cloud settings for the security profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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). + /// + 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}' + /// + 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. + /// + bool? EnablePodSecurityPolicy { 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. + 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. + 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 + /// vnet which is used to create the managed cluster. + ///
+ string GmsaProfileRootDomainName { get; set; } + /// Configurations for provisioning the cluster with HTTP proxy servers. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterHttpProxyConfig HttpProxyConfig { get; set; } + /// The HTTP proxy server endpoint to use. + string HttpProxyConfigHttpProxy { get; set; } + /// The HTTPS proxy server endpoint to use. + string HttpProxyConfigHttpsProxy { get; set; } + /// The endpoints that should not go through proxy. + string[] HttpProxyConfigNoProxy { get; set; } + /// Alternative CA cert to use for connecting to proxy servers. + string HttpProxyConfigTrustedCa { get; set; } + /// Identities associated with the cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile IdentityProfile { get; set; } + /// Whether to enable Image Cleaner on AKS cluster. + bool? ImageCleanerEnabled { get; set; } + /// Image Cleaner scanning interval in hours. + int? ImageCleanerIntervalHour { get; set; } + /// Whether to enable KEDA. + bool? KedaEnabled { 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. + /// + string KubeStateMetricAnnotationsAllowList { get; set; } + /// + /// Comma-separated list of additional Kubernetes label keys that will be used in the resource's labels metric (Example: 'namespaces=[k8s-label-1,k8s-label-n,...],pods=[app],...'). + /// By default the metric contains only resource name and namespace labels. + /// + 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) + /// for more details. + /// + string KubernetesVersion { get; set; } + /// The profile for Linux VMs in the Managed Cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceLinuxProfile LinuxProfile { get; set; } + /// The administrator username to use for Linux VMs. + string LinuxProfileAdminUsername { get; set; } + /// The SSH configuration for Linux-based VMs running on Azure. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshConfiguration LinuxProfileSsh { get; set; } + /// The max number of agent pools for the managed cluster. + int? MaxAgentPool { get; set; } + /// + /// Whether to enable or disable the Azure Managed Prometheus addon for Prometheus monitoring. See aka.ms/AzureManagedPrometheus-aks-enable + /// for details on enabling and disabling. + /// + bool? MetricEnabled { get; set; } + /// + /// Kube State Metrics profile for the Azure Managed Prometheus addon. These optional settings are for the kube-state-metrics + /// pod that is deployed with the addon. See aka.ms/AzureManagedPrometheus-optional-parameters for details. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAzureMonitorProfileKubeStateMetrics MetricKubeStateMetric { get; set; } + /// The network configuration profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceNetworkProfile NetworkProfile { get; set; } + /// The name of the resource group containing agent pool nodes. + string NodeResourceGroup { get; set; } + /// The OIDC issuer profile of the Managed Cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterOidcIssuerProfile OidcIssuerProfile { get; set; } + /// Whether the OIDC issuer is enabled. + bool? OidcIssuerProfileEnabled { get; set; } + /// 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. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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) + /// for more information. + /// + bool? PodIdentityProfileAllowNetworkPluginKubenet { get; set; } + /// Whether the pod identity addon is enabled. + bool? PodIdentityProfileEnabled { get; set; } + /// The pod identities to use in the cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentity[] PodIdentityProfileUserAssignedIdentity { get; set; } + /// The pod identity exceptions to allow. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPodIdentityException[] PodIdentityProfileUserAssignedIdentityException { get; set; } + /// The Power State of the cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState PowerState { get; set; } + /// Tells whether the cluster is Running or Stopped + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code? PowerStateCode { get; set; } + /// The FQDN of private cluster. + string PrivateFqdn { get; set; } + /// Private link resources associated with the cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] PrivateLinkResource { get; set; } + /// The current provisioning state. + string ProvisioningState { get; set; } + /// Allow or deny public network access for AKS + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess? PublicNetworkAccess { get; set; } + /// Whether to enable Defender threat detection + bool? SecurityMonitoringEnabled { get; set; } + /// Security profile for the managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile SecurityProfile { get; set; } + /// + /// Azure Key Vault [key management service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for + /// the security profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms SecurityProfileAzureKeyVaultKm { get; set; } + /// Microsoft Defender settings for the security profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender SecurityProfileDefender { get; set; } + /// Image Cleaner settings for the security profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner SecurityProfileImageCleaner { get; set; } + /// + /// Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access Azure + /// cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity SecurityProfileWorkloadIdentity { get; set; } + /// + /// Information about a service principal identity for the cluster to use for manipulating Azure APIs. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile ServicePrincipalProfile { get; set; } + /// The ID for the service principal. + string ServicePrincipalProfileClientId { get; set; } + /// The secret password associated with the service principal in plain text. + string ServicePrincipalProfileSecret { get; set; } + /// Whether to enable Snapshot Controller. The default value is true. + bool? SnapshotControllerEnabled { get; set; } + /// + /// The list of SSH public keys used to authenticate with Linux-based VMs. A maximum of 1 key may be specified. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IContainerServiceSshPublicKey[] SshPublicKey { get; set; } + /// Storage profile for the managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile StorageProfile { get; set; } + /// AzureBlob CSI Driver settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver StorageProfileBlobCsiDriver { get; set; } + /// AzureDisk CSI Driver settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver StorageProfileDiskCsiDriver { get; set; } + /// AzureFile CSI Driver settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver StorageProfileFileCsiDriver { get; set; } + /// Snapshot Controller settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController StorageProfileSnapshotController { 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:** + /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + ///
+ string WindowProfileAdminPassword { get; set; } + /// + /// Specifies the name of the administrator account.

**Restriction:** Cannot end in "."

**Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters + ///
+ string WindowProfileAdminUsername { get; set; } + /// + /// 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. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile WindowProfileGmsaProfile { get; set; } + /// + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? WindowProfileLicenseType { get; set; } + /// The profile for Windows VMs in the Managed Cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile WindowsProfile { get; set; } + /// Workload Auto-scaler profile for the managed cluster. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile WorkloadAutoScalerProfile { get; set; } + /// + /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda WorkloadAutoScalerProfileKeda { get; set; } + /// Whether to enable workload identity. + bool? WorkloadIdentityEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.json.cs similarity index 64% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.json.cs index 7f03f6dcfcb6..b09c081c34ae 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterProperties.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterProperties 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.Api20200901.IManagedClusterProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterProperties(json) : null; } @@ -77,27 +77,41 @@ internal ManagedClusterProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime { return; } - {_powerState = If( json?.PropertyT("powerState"), out var __jsonPowerState) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PowerState.FromJson(__jsonPowerState) : PowerState;} - {_linuxProfile = If( json?.PropertyT("linuxProfile"), out var __jsonLinuxProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceLinuxProfile.FromJson(__jsonLinuxProfile) : LinuxProfile;} - {_windowsProfile = If( json?.PropertyT("windowsProfile"), out var __jsonWindowsProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterWindowsProfile.FromJson(__jsonWindowsProfile) : WindowsProfile;} - {_servicePrincipalProfile = If( json?.PropertyT("servicePrincipalProfile"), out var __jsonServicePrincipalProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterServicePrincipalProfile.FromJson(__jsonServicePrincipalProfile) : ServicePrincipalProfile;} - {_networkProfile = If( json?.PropertyT("networkProfile"), out var __jsonNetworkProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ContainerServiceNetworkProfile.FromJson(__jsonNetworkProfile) : NetworkProfile;} - {_aadProfile = If( json?.PropertyT("aadProfile"), out var __jsonAadProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAadProfile.FromJson(__jsonAadProfile) : AadProfile;} - {_autoScalerProfile = If( json?.PropertyT("autoScalerProfile"), out var __jsonAutoScalerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAutoScalerProfile.FromJson(__jsonAutoScalerProfile) : AutoScalerProfile;} - {_apiServerAccessProfile = If( json?.PropertyT("apiServerAccessProfile"), out var __jsonApiServerAccessProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterApiServerAccessProfile.FromJson(__jsonApiServerAccessProfile) : ApiServerAccessProfile;} + {_powerState = If( json?.PropertyT("powerState"), out var __jsonPowerState) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PowerState.FromJson(__jsonPowerState) : PowerState;} + {_linuxProfile = If( json?.PropertyT("linuxProfile"), out var __jsonLinuxProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceLinuxProfile.FromJson(__jsonLinuxProfile) : LinuxProfile;} + {_windowsProfile = If( json?.PropertyT("windowsProfile"), out var __jsonWindowsProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWindowsProfile.FromJson(__jsonWindowsProfile) : WindowsProfile;} + {_servicePrincipalProfile = If( json?.PropertyT("servicePrincipalProfile"), out var __jsonServicePrincipalProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterServicePrincipalProfile.FromJson(__jsonServicePrincipalProfile) : ServicePrincipalProfile;} + {_podIdentityProfile = If( json?.PropertyT("podIdentityProfile"), out var __jsonPodIdentityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPodIdentityProfile.FromJson(__jsonPodIdentityProfile) : PodIdentityProfile;} + {_oidcIssuerProfile = If( json?.PropertyT("oidcIssuerProfile"), out var __jsonOidcIssuerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterOidcIssuerProfile.FromJson(__jsonOidcIssuerProfile) : OidcIssuerProfile;} + {_aadProfile = If( json?.PropertyT("aadProfile"), out var __jsonAadProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAadProfile.FromJson(__jsonAadProfile) : AadProfile;} + {_autoUpgradeProfile = If( json?.PropertyT("autoUpgradeProfile"), out var __jsonAutoUpgradeProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAutoUpgradeProfile.FromJson(__jsonAutoUpgradeProfile) : AutoUpgradeProfile;} + {_autoScalerProfile = If( json?.PropertyT("autoScalerProfile"), out var __jsonAutoScalerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAutoScalerProfile.FromJson(__jsonAutoScalerProfile) : AutoScalerProfile;} + {_apiServerAccessProfile = If( json?.PropertyT("apiServerAccessProfile"), out var __jsonApiServerAccessProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterApiServerAccessProfile.FromJson(__jsonApiServerAccessProfile) : ApiServerAccessProfile;} + {_httpProxyConfig = If( json?.PropertyT("httpProxyConfig"), out var __jsonHttpProxyConfig) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterHttpProxyConfig.FromJson(__jsonHttpProxyConfig) : HttpProxyConfig;} + {_securityProfile = If( json?.PropertyT("securityProfile"), out var __jsonSecurityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfile.FromJson(__jsonSecurityProfile) : SecurityProfile;} + {_storageProfile = If( json?.PropertyT("storageProfile"), out var __jsonStorageProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfile.FromJson(__jsonStorageProfile) : StorageProfile;} + {_workloadAutoScalerProfile = If( json?.PropertyT("workloadAutoScalerProfile"), out var __jsonWorkloadAutoScalerProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfile.FromJson(__jsonWorkloadAutoScalerProfile) : WorkloadAutoScalerProfile;} + {_azureMonitorProfile = If( json?.PropertyT("azureMonitorProfile"), out var __jsonAzureMonitorProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAzureMonitorProfile.FromJson(__jsonAzureMonitorProfile) : AzureMonitorProfile;} {_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;} + {_currentKubernetesVersion = If( json?.PropertyT("currentKubernetesVersion"), out var __jsonCurrentKubernetesVersion) ? (string)__jsonCurrentKubernetesVersion : (string)CurrentKubernetesVersion;} {_dnsPrefix = If( json?.PropertyT("dnsPrefix"), out var __jsonDnsPrefix) ? (string)__jsonDnsPrefix : (string)DnsPrefix;} + {_fqdnSubdomain = If( json?.PropertyT("fqdnSubdomain"), out var __jsonFqdnSubdomain) ? (string)__jsonFqdnSubdomain : (string)FqdnSubdomain;} {_fqdn = If( json?.PropertyT("fqdn"), out var __jsonFqdn) ? (string)__jsonFqdn : (string)Fqdn;} {_privateFqdn = If( json?.PropertyT("privateFQDN"), out var __jsonPrivateFqdn) ? (string)__jsonPrivateFqdn : (string)PrivateFqdn;} - {_agentPoolProfile = If( json?.PropertyT("agentPoolProfiles"), out var __jsonAgentPoolProfiles) ? If( __jsonAgentPoolProfiles as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAgentPoolProfile) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterAgentPoolProfile.FromJson(__u) )) ))() : null : AgentPoolProfile;} - {_addonProfile = If( json?.PropertyT("addonProfiles"), out var __jsonAddonProfiles) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAddonProfiles.FromJson(__jsonAddonProfiles) : AddonProfile;} + {_azurePortalFqdn = If( json?.PropertyT("azurePortalFQDN"), out var __jsonAzurePortalFqdn) ? (string)__jsonAzurePortalFqdn : (string)AzurePortalFqdn;} + {_agentPoolProfile = If( json?.PropertyT("agentPoolProfiles"), out var __jsonAgentPoolProfiles) ? If( __jsonAgentPoolProfiles as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAgentPoolProfile) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterAgentPoolProfile.FromJson(__u) )) ))() : null : AgentPoolProfile;} + {_addonProfile = If( json?.PropertyT("addonProfiles"), out var __jsonAddonProfiles) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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;} {_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.Api20200901.ManagedClusterPropertiesIdentityProfile.FromJson(__jsonIdentityProfile) : IdentityProfile;} + {_identityProfile = If( json?.PropertyT("identityProfile"), out var __jsonIdentityProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.ToArray(global::System.Linq.Enumerable.Select(__q, (__p)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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;} + {_networkProfile = If( json?.PropertyT("networkProfile"), out var __jsonNetworkProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ContainerServiceNetworkProfile.FromJson(__jsonNetworkProfile) : NetworkProfile;} AfterFromJson(json); } @@ -127,10 +141,17 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != this._linuxProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._linuxProfile.ToJson(null,serializationMode) : null, "linuxProfile" ,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._servicePrincipalProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._servicePrincipalProfile.ToJson(null,serializationMode) : null, "servicePrincipalProfile" ,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._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._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._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._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 ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) { 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 ); @@ -140,7 +161,12 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro AddIf( null != this._maxAgentPool ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._maxAgentPool) : null, "maxAgentPools" ,container.Add ); } AddIf( null != (((object)this._kubernetesVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._kubernetesVersion.ToString()) : null, "kubernetesVersion" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._currentKubernetesVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._currentKubernetesVersion.ToString()) : null, "currentKubernetesVersion" ,container.Add ); + } AddIf( null != (((object)this._dnsPrefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._dnsPrefix.ToString()) : null, "dnsPrefix" ,container.Add ); + AddIf( null != (((object)this._fqdnSubdomain)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._fqdnSubdomain.ToString()) : null, "fqdnSubdomain" ,container.Add ); if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) { AddIf( null != (((object)this._fqdn)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._fqdn.ToString()) : null, "fqdn" ,container.Add ); @@ -149,6 +175,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { AddIf( null != (((object)this._privateFqdn)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._privateFqdn.ToString()) : null, "privateFQDN" ,container.Add ); } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._azurePortalFqdn)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._azurePortalFqdn.ToString()) : null, "azurePortalFQDN" ,container.Add ); + } if (null != this._agentPoolProfile) { var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); @@ -164,6 +194,18 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro 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._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) + { + var __r = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __s in this._privateLinkResource ) + { + AddIf(__s?.ToJson(null, serializationMode) ,__r.Add); + } + container.Add("privateLinkResources",__r); + } + 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 ); + 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/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.PowerShell.cs similarity index 90% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.PowerShell.cs index f9f98c4a71d6..c28d06f78f9b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.PowerShell.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Profile of managed cluster add-on. + /// The profile of managed cluster add-on. [System.ComponentModel.TypeConverter(typeof(ManagedClusterPropertiesAddonProfilesTypeConverter))] public partial class ManagedClusterPropertiesAddonProfiles { @@ -55,29 +55,29 @@ public partial class ManagedClusterPropertiesAddonProfiles partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterPropertiesAddonProfiles(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterPropertiesAddonProfiles(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles 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. @@ -112,7 +112,7 @@ internal ManagedClusterPropertiesAddonProfiles(global::System.Collections.IDicti } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. @@ -135,7 +135,7 @@ internal ManagedClusterPropertiesAddonProfiles(global::System.Management.Automat /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// Profile of managed cluster add-on. + /// The profile of managed cluster add-on. [System.ComponentModel.TypeConverter(typeof(ManagedClusterPropertiesAddonProfilesTypeConverter))] public partial interface IManagedClusterPropertiesAddonProfiles diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.TypeConverter.cs index 69900f983406..17e53cc8d32c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.cs similarity index 72% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.cs index c08d433ab700..c01fb356973b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Profile of managed cluster add-on. + /// The profile of managed cluster add-on. public partial class ManagedClusterPropertiesAddonProfiles : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfilesInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfilesInternal { /// Creates an new instance. @@ -19,14 +19,14 @@ public ManagedClusterPropertiesAddonProfiles() } } - /// Profile of managed cluster add-on. + /// The profile of managed cluster add-on. public partial interface IManagedClusterPropertiesAddonProfiles : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray { } - /// Profile of managed cluster add-on. + /// The profile of managed cluster add-on. internal partial interface IManagedClusterPropertiesAddonProfilesInternal { diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.dictionary.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.dictionary.cs similarity index 80% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.dictionary.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.dictionary.cs index 193796ccb7c3..771c3ba8d919 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.dictionary.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; public partial class ManagedClusterPropertiesAddonProfiles : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + 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; } + 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; } + 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.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfile this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile 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.Api20200901.IManagedClusterAddonProfile value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAddonProfile value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterAddonProfile value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesAddonProfiles source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesAddonProfiles source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.json.cs similarity index 92% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.json.cs index 869f6ad87b5d..34c7e0f5070f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAddonProfiles.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAddonProfiles.json.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Profile of managed cluster add-on. + /// The profile of managed cluster add-on. public partial class ManagedClusterPropertiesAddonProfiles { @@ -54,13 +54,13 @@ public partial class ManagedClusterPropertiesAddonProfiles 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.Api20200901.IManagedClusterPropertiesAddonProfiles. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAddonProfiles FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAddonProfiles FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPropertiesAddonProfiles(json) : null; } @@ -78,7 +78,7 @@ internal ManagedClusterPropertiesAddonProfiles(Microsoft.Azure.PowerShell.Cmdlet { 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.Api20200901.ManagedClusterAddonProfile.FromJson(j) ,exclusions ); + 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.Api20230201.ManagedClusterAddonProfile.FromJson(j) ,exclusions ); AfterFromJson(json); } @@ -102,7 +102,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs similarity index 76% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs index 332ed597b1b6..26ce821a7def 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterPropertiesAutoScalerProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterPropertiesAutoScalerProfile(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterPropertiesAutoScalerProfile(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile 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. @@ -108,73 +108,77 @@ internal ManagedClusterPropertiesAutoScalerProfile(global::System.Collections.ID // actually deserialize if (content.Contains("BalanceSimilarNodeGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup = (string) content.GetValueForProperty("BalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup = (string) content.GetValueForProperty("BalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup, global::System.Convert.ToString); } if (content.Contains("Expander")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("Expander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("Expander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); } if (content.Contains("MaxEmptyBulkDelete")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxEmptyBulkDelete = (string) content.GetValueForProperty("MaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxEmptyBulkDelete, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxEmptyBulkDelete = (string) content.GetValueForProperty("MaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxEmptyBulkDelete, global::System.Convert.ToString); } if (content.Contains("MaxGracefulTerminationSec")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxGracefulTerminationSec = (string) content.GetValueForProperty("MaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxGracefulTerminationSec, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxGracefulTerminationSec = (string) content.GetValueForProperty("MaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxGracefulTerminationSec, global::System.Convert.ToString); + } + if (content.Contains("MaxNodeProvisionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxNodeProvisionTime = (string) content.GetValueForProperty("MaxNodeProvisionTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxNodeProvisionTime, global::System.Convert.ToString); } if (content.Contains("MaxTotalUnreadyPercentage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxTotalUnreadyPercentage = (string) content.GetValueForProperty("MaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxTotalUnreadyPercentage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxTotalUnreadyPercentage = (string) content.GetValueForProperty("MaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxTotalUnreadyPercentage, global::System.Convert.ToString); } if (content.Contains("NewPodScaleUpDelay")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).NewPodScaleUpDelay = (string) content.GetValueForProperty("NewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).NewPodScaleUpDelay, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).NewPodScaleUpDelay = (string) content.GetValueForProperty("NewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).NewPodScaleUpDelay, global::System.Convert.ToString); } if (content.Contains("OkTotalUnreadyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).OkTotalUnreadyCount = (string) content.GetValueForProperty("OkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).OkTotalUnreadyCount, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).OkTotalUnreadyCount = (string) content.GetValueForProperty("OkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).OkTotalUnreadyCount, global::System.Convert.ToString); } if (content.Contains("ScanInterval")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScanInterval = (string) content.GetValueForProperty("ScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScanInterval, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScanInterval = (string) content.GetValueForProperty("ScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScanInterval, global::System.Convert.ToString); } if (content.Contains("ScaleDownDelayAfterAdd")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterAdd = (string) content.GetValueForProperty("ScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterAdd, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterAdd = (string) content.GetValueForProperty("ScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterAdd, global::System.Convert.ToString); } if (content.Contains("ScaleDownDelayAfterDelete")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterDelete = (string) content.GetValueForProperty("ScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterDelete, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterDelete = (string) content.GetValueForProperty("ScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterDelete, global::System.Convert.ToString); } if (content.Contains("ScaleDownDelayAfterFailure")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterFailure = (string) content.GetValueForProperty("ScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterFailure, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterFailure = (string) content.GetValueForProperty("ScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterFailure, global::System.Convert.ToString); } if (content.Contains("ScaleDownUnneededTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnneededTime = (string) content.GetValueForProperty("ScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnneededTime, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnneededTime = (string) content.GetValueForProperty("ScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnneededTime, global::System.Convert.ToString); } if (content.Contains("ScaleDownUnreadyTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnreadyTime = (string) content.GetValueForProperty("ScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnreadyTime, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnreadyTime = (string) content.GetValueForProperty("ScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnreadyTime, global::System.Convert.ToString); } if (content.Contains("ScaleDownUtilizationThreshold")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUtilizationThreshold = (string) content.GetValueForProperty("ScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUtilizationThreshold, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUtilizationThreshold = (string) content.GetValueForProperty("ScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUtilizationThreshold, global::System.Convert.ToString); } if (content.Contains("SkipNodesWithLocalStorage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithLocalStorage = (string) content.GetValueForProperty("SkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithLocalStorage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithLocalStorage = (string) content.GetValueForProperty("SkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithLocalStorage, global::System.Convert.ToString); } if (content.Contains("SkipNodesWithSystemPod")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithSystemPod = (string) content.GetValueForProperty("SkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithSystemPod, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithSystemPod = (string) content.GetValueForProperty("SkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithSystemPod, 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. @@ -189,67 +193,71 @@ internal ManagedClusterPropertiesAutoScalerProfile(global::System.Management.Aut // actually deserialize if (content.Contains("BalanceSimilarNodeGroup")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup = (string) content.GetValueForProperty("BalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup = (string) content.GetValueForProperty("BalanceSimilarNodeGroup",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).BalanceSimilarNodeGroup, global::System.Convert.ToString); } if (content.Contains("Expander")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("Expander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander?) content.GetValueForProperty("Expander",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).Expander, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander.CreateFrom); } if (content.Contains("MaxEmptyBulkDelete")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxEmptyBulkDelete = (string) content.GetValueForProperty("MaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxEmptyBulkDelete, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxEmptyBulkDelete = (string) content.GetValueForProperty("MaxEmptyBulkDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxEmptyBulkDelete, global::System.Convert.ToString); } if (content.Contains("MaxGracefulTerminationSec")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxGracefulTerminationSec = (string) content.GetValueForProperty("MaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxGracefulTerminationSec, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxGracefulTerminationSec = (string) content.GetValueForProperty("MaxGracefulTerminationSec",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxGracefulTerminationSec, global::System.Convert.ToString); + } + if (content.Contains("MaxNodeProvisionTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxNodeProvisionTime = (string) content.GetValueForProperty("MaxNodeProvisionTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxNodeProvisionTime, global::System.Convert.ToString); } if (content.Contains("MaxTotalUnreadyPercentage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxTotalUnreadyPercentage = (string) content.GetValueForProperty("MaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxTotalUnreadyPercentage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxTotalUnreadyPercentage = (string) content.GetValueForProperty("MaxTotalUnreadyPercentage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).MaxTotalUnreadyPercentage, global::System.Convert.ToString); } if (content.Contains("NewPodScaleUpDelay")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).NewPodScaleUpDelay = (string) content.GetValueForProperty("NewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).NewPodScaleUpDelay, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).NewPodScaleUpDelay = (string) content.GetValueForProperty("NewPodScaleUpDelay",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).NewPodScaleUpDelay, global::System.Convert.ToString); } if (content.Contains("OkTotalUnreadyCount")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).OkTotalUnreadyCount = (string) content.GetValueForProperty("OkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).OkTotalUnreadyCount, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).OkTotalUnreadyCount = (string) content.GetValueForProperty("OkTotalUnreadyCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).OkTotalUnreadyCount, global::System.Convert.ToString); } if (content.Contains("ScanInterval")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScanInterval = (string) content.GetValueForProperty("ScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScanInterval, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScanInterval = (string) content.GetValueForProperty("ScanInterval",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScanInterval, global::System.Convert.ToString); } if (content.Contains("ScaleDownDelayAfterAdd")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterAdd = (string) content.GetValueForProperty("ScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterAdd, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterAdd = (string) content.GetValueForProperty("ScaleDownDelayAfterAdd",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterAdd, global::System.Convert.ToString); } if (content.Contains("ScaleDownDelayAfterDelete")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterDelete = (string) content.GetValueForProperty("ScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterDelete, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterDelete = (string) content.GetValueForProperty("ScaleDownDelayAfterDelete",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterDelete, global::System.Convert.ToString); } if (content.Contains("ScaleDownDelayAfterFailure")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterFailure = (string) content.GetValueForProperty("ScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterFailure, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterFailure = (string) content.GetValueForProperty("ScaleDownDelayAfterFailure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownDelayAfterFailure, global::System.Convert.ToString); } if (content.Contains("ScaleDownUnneededTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnneededTime = (string) content.GetValueForProperty("ScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnneededTime, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnneededTime = (string) content.GetValueForProperty("ScaleDownUnneededTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnneededTime, global::System.Convert.ToString); } if (content.Contains("ScaleDownUnreadyTime")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnreadyTime = (string) content.GetValueForProperty("ScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnreadyTime, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnreadyTime = (string) content.GetValueForProperty("ScaleDownUnreadyTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUnreadyTime, global::System.Convert.ToString); } if (content.Contains("ScaleDownUtilizationThreshold")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUtilizationThreshold = (string) content.GetValueForProperty("ScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUtilizationThreshold, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUtilizationThreshold = (string) content.GetValueForProperty("ScaleDownUtilizationThreshold",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).ScaleDownUtilizationThreshold, global::System.Convert.ToString); } if (content.Contains("SkipNodesWithLocalStorage")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithLocalStorage = (string) content.GetValueForProperty("SkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithLocalStorage, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithLocalStorage = (string) content.GetValueForProperty("SkipNodesWithLocalStorage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithLocalStorage, global::System.Convert.ToString); } if (content.Contains("SkipNodesWithSystemPod")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithSystemPod = (string) content.GetValueForProperty("SkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithSystemPod, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithSystemPod = (string) content.GetValueForProperty("SkipNodesWithSystemPod",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal)this).SkipNodesWithSystemPod, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.TypeConverter.cs index 18ec11246945..a75bbebe73c8 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.cs similarity index 56% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.cs index a16c7a8104a6..6637ea15264e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.cs @@ -3,109 +3,152 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Parameters to be applied to the cluster-autoscaler when enabled public partial class ManagedClusterPropertiesAutoScalerProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfileInternal { /// Backing field for property. private string _balanceSimilarNodeGroup; + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? _expander; + /// + /// 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? Expander { get => this._expander; set => this._expander = value; } /// Backing field for property. private string _maxEmptyBulkDelete; + /// 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. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string MaxGracefulTerminationSec { get => this._maxGracefulTerminationSec; set => this._maxGracefulTerminationSec = value; } + /// Backing field for property. + 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string MaxNodeProvisionTime { get => this._maxNodeProvisionTime; set => this._maxNodeProvisionTime = value; } + /// Backing field for property. private string _maxTotalUnreadyPercentage; + /// 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; } /// Backing field for property. 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). + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string NewPodScaleUpDelay { get => this._newPodScaleUpDelay; set => this._newPodScaleUpDelay = value; } /// Backing field for property. private string _okTotalUnreadyCount; + /// 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; } /// Backing field for property. 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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownDelayAfterAdd { get => this._scaleDownDelayAfterAdd; set => this._scaleDownDelayAfterAdd = value; } /// Backing field for property. 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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownDelayAfterDelete { get => this._scaleDownDelayAfterDelete; set => this._scaleDownDelayAfterDelete = value; } /// Backing field for property. 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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownDelayAfterFailure { get => this._scaleDownDelayAfterFailure; set => this._scaleDownDelayAfterFailure = value; } /// Backing field for property. 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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownUnneededTime { get => this._scaleDownUnneededTime; set => this._scaleDownUnneededTime = value; } /// Backing field for property. 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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ScaleDownUnreadyTime { get => this._scaleDownUnreadyTime; set => this._scaleDownUnreadyTime = value; } /// Backing field for property. private string _scaleDownUtilizationThreshold; + /// 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. [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. [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. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string SkipNodesWithSystemPod { get => this._skipNodesWithSystemPod; set => this._skipNodesWithSystemPod = value; } @@ -121,130 +164,159 @@ public ManagedClusterPropertiesAutoScalerProfile() public partial interface IManagedClusterPropertiesAutoScalerProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { + /// Valid values are 'true' and 'false' [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"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) + /// for more information. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + 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", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? Expander { get; set; } - + /// The default is 10. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"The default is 10.", SerializedName = @"max-empty-bulk-delete", PossibleTypes = new [] { typeof(string) })] string MaxEmptyBulkDelete { get; set; } - + /// The default is 600. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + 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", + PossibleTypes = new [] { typeof(string) })] + string MaxNodeProvisionTime { get; set; } + /// The default is 45. The maximum is 100 and the minimum is 0. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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). + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + 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).", SerializedName = @"new-pod-scale-up-delay", PossibleTypes = new [] { typeof(string) })] string NewPodScaleUpDelay { get; set; } - + /// This must be an integer. The default is 3. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + 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.", 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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"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. + /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"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'. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"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. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"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. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"The default is true.", SerializedName = @"skip-nodes-with-local-storage", PossibleTypes = new [] { typeof(string) })] string SkipNodesWithLocalStorage { get; set; } - + /// The default is true. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"", + Description = @"The default is true.", SerializedName = @"skip-nodes-with-system-pods", PossibleTypes = new [] { typeof(string) })] string SkipNodesWithSystemPod { get; set; } @@ -254,36 +326,59 @@ public partial interface IManagedClusterPropertiesAutoScalerProfile : internal partial interface IManagedClusterPropertiesAutoScalerProfileInternal { + /// 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) + /// for more information. + /// Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander? Expander { get; set; } - + /// The default is 10. string MaxEmptyBulkDelete { get; set; } - + /// 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. + /// + string MaxNodeProvisionTime { get; set; } + /// 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). + /// string NewPodScaleUpDelay { get; set; } - + /// 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. + /// 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. + /// 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. + /// 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. + /// 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. + /// string ScaleDownUnreadyTime { get; set; } - + /// The default is '0.5'. string ScaleDownUtilizationThreshold { get; set; } - + /// The default is '10'. Values must be an integer number of seconds. string ScanInterval { get; set; } - + /// The default is true. string SkipNodesWithLocalStorage { get; set; } - + /// The default is true. string SkipNodesWithSystemPod { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.json.cs index 24ab8b366e7d..375684202e36 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesAutoScalerProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesAutoScalerProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterPropertiesAutoScalerProfile 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.Api20200901.IManagedClusterPropertiesAutoScalerProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesAutoScalerProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesAutoScalerProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPropertiesAutoScalerProfile(json) : null; } @@ -81,6 +81,7 @@ internal ManagedClusterPropertiesAutoScalerProfile(Microsoft.Azure.PowerShell.Cm {_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;} + {_maxNodeProvisionTime = If( json?.PropertyT("max-node-provision-time"), out var __jsonMaxNodeProvisionTime) ? (string)__jsonMaxNodeProvisionTime : (string)MaxNodeProvisionTime;} {_maxTotalUnreadyPercentage = If( json?.PropertyT("max-total-unready-percentage"), out var __jsonMaxTotalUnreadyPercentage) ? (string)__jsonMaxTotalUnreadyPercentage : (string)MaxTotalUnreadyPercentage;} {_newPodScaleUpDelay = If( json?.PropertyT("new-pod-scale-up-delay"), out var __jsonNewPodScaleUpDelay) ? (string)__jsonNewPodScaleUpDelay : (string)NewPodScaleUpDelay;} {_okTotalUnreadyCount = If( json?.PropertyT("ok-total-unready-count"), out var __jsonOkTotalUnreadyCount) ? (string)__jsonOkTotalUnreadyCount : (string)OkTotalUnreadyCount;} @@ -121,6 +122,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro 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 ); + AddIf( null != (((object)this._maxNodeProvisionTime)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._maxNodeProvisionTime.ToString()) : null, "max-node-provision-time" ,container.Add ); AddIf( null != (((object)this._maxTotalUnreadyPercentage)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._maxTotalUnreadyPercentage.ToString()) : null, "max-total-unready-percentage" ,container.Add ); AddIf( null != (((object)this._newPodScaleUpDelay)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._newPodScaleUpDelay.ToString()) : null, "new-pod-scale-up-delay" ,container.Add ); AddIf( null != (((object)this._okTotalUnreadyCount)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._okTotalUnreadyCount.ToString()) : null, "ok-total-unready-count" ,container.Add ); diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.PowerShell.cs similarity index 92% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.PowerShell.cs index e7028202c449..b96e67f7785c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterPropertiesIdentityProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterPropertiesIdentityProfile(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterPropertiesIdentityProfile(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile 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. @@ -112,7 +112,7 @@ internal ManagedClusterPropertiesIdentityProfile(global::System.Collections.IDic } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.TypeConverter.cs index 4f4c219a6c3d..67a0aa6c3b24 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.cs similarity index 82% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.cs index 60d6b4f88430..e1d1072bc98f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Identities associated with the cluster. public partial class ManagedClusterPropertiesIdentityProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfileInternal { /// Creates an new instance. @@ -22,7 +22,7 @@ public ManagedClusterPropertiesIdentityProfile() /// Identities associated with the cluster. public partial interface IManagedClusterPropertiesIdentityProfile : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray { } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.dictionary.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.dictionary.cs similarity index 79% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.dictionary.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.dictionary.cs index 1b15bdeed374..ab88beb09e1d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.dictionary.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.dictionary.cs @@ -3,28 +3,28 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; public partial class ManagedClusterPropertiesIdentityProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray { - protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); + 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; } + 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; } + 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.Keys { get => __additionalProperties.Keys; } - global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } + global::System.Collections.Generic.IEnumerable Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray.Values { get => __additionalProperties.Values; } - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity this[global::System.String index] { get => __additionalProperties[index]; set => __additionalProperties[index] = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity 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.Api20200901.IUserAssignedIdentity value) => __additionalProperties.Add( key, value); + public void Add(global::System.String key, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity value) => __additionalProperties.Add( key, value); public void Clear() => __additionalProperties.Clear(); @@ -40,7 +40,7 @@ public void CopyFrom(global::System.Collections.IDictionary source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -55,7 +55,7 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) { if ((null != property.Key && null != property.Value)) { - this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); + this.__additionalProperties.Add(property.Key.ToString(), global::System.Management.Automation.LanguagePrimitives.ConvertTo( property.Value)); } } } @@ -66,10 +66,10 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// /// - public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity value) => __additionalProperties.TryGetValue( key, out value); + public bool TryGetValue(global::System.String key, out Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity value) => __additionalProperties.TryGetValue( key, out value); /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPropertiesIdentityProfile source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPropertiesIdentityProfile source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.json.cs similarity index 93% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.json.cs index 49b70f6c4ee6..9d1511ca1bd4 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterPropertiesIdentityProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterPropertiesIdentityProfile 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.Api20200901.IManagedClusterPropertiesIdentityProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPropertiesIdentityProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPropertiesIdentityProfile(json) : null; } @@ -78,7 +78,7 @@ internal ManagedClusterPropertiesIdentityProfile(Microsoft.Azure.PowerShell.Cmdl { 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.Api20200901.UserAssignedIdentity.FromJson(j) ,exclusions ); + 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.Api20230201.UserAssignedIdentity.FromJson(j) ,exclusions ); AfterFromJson(json); } @@ -103,7 +103,7 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray)this).AdditionalProperties, container); + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.JsonSerializable.ToJson( ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray)this).AdditionalProperties, container); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.PowerShell.cs new file mode 100644 index 000000000000..0e660aa62c94 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.PowerShell.cs @@ -0,0 +1,248 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Security profile for the container service cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterSecurityProfileTypeConverter))] + public partial class ManagedClusterSecurityProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterSecurityProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterSecurityProfile(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.Api20230201.IManagedClusterSecurityProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterSecurityProfile(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.Api20230201.IManagedClusterSecurityProfile 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 ManagedClusterSecurityProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Defender")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).Defender = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender) content.GetValueForProperty("Defender",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).Defender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderTypeConverter.ConvertFrom); + } + if (content.Contains("AzureKeyVaultKm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKm = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms) content.GetValueForProperty("AzureKeyVaultKm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKm, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKmsTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).WorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity) content.GetValueForProperty("WorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).WorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ImageCleaner")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("ImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); + } + if (content.Contains("AzureKeyVaultKmKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); + } + if (content.Contains("DefenderSecurityMonitoring")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).DefenderSecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("DefenderSecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).DefenderSecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); + } + if (content.Contains("DefenderLogAnalyticsWorkspaceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).DefenderLogAnalyticsWorkspaceResourceId = (string) content.GetValueForProperty("DefenderLogAnalyticsWorkspaceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).DefenderLogAnalyticsWorkspaceResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureKeyVaultKmEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmEnabled = (bool?) content.GetValueForProperty("AzureKeyVaultKmEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AzureKeyVaultKmKeyVaultNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes?) content.GetValueForProperty("AzureKeyVaultKmKeyVaultNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes.CreateFrom); + } + if (content.Contains("AzureKeyVaultKmKeyVaultResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyVaultResourceId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyVaultResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyVaultResourceId, global::System.Convert.ToString); + } + if (content.Contains("WorkloadIdentityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleanerEnabled = (bool?) content.GetValueForProperty("ImageCleanerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleanerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerIntervalHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleanerIntervalHour = (int?) content.GetValueForProperty("ImageCleanerIntervalHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleanerIntervalHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SecurityMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).SecurityMonitoringEnabled, (__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 ManagedClusterSecurityProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Defender")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).Defender = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender) content.GetValueForProperty("Defender",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).Defender, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderTypeConverter.ConvertFrom); + } + if (content.Contains("AzureKeyVaultKm")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKm = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms) content.GetValueForProperty("AzureKeyVaultKm",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKm, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKmsTypeConverter.ConvertFrom); + } + if (content.Contains("WorkloadIdentity")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).WorkloadIdentity = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity) content.GetValueForProperty("WorkloadIdentity",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).WorkloadIdentity, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentityTypeConverter.ConvertFrom); + } + if (content.Contains("ImageCleaner")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleaner = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner) content.GetValueForProperty("ImageCleaner",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleaner, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleanerTypeConverter.ConvertFrom); + } + if (content.Contains("AzureKeyVaultKmKeyId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyId, global::System.Convert.ToString); + } + if (content.Contains("DefenderSecurityMonitoring")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).DefenderSecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("DefenderSecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).DefenderSecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); + } + if (content.Contains("DefenderLogAnalyticsWorkspaceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).DefenderLogAnalyticsWorkspaceResourceId = (string) content.GetValueForProperty("DefenderLogAnalyticsWorkspaceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).DefenderLogAnalyticsWorkspaceResourceId, global::System.Convert.ToString); + } + if (content.Contains("AzureKeyVaultKmEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmEnabled = (bool?) content.GetValueForProperty("AzureKeyVaultKmEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("AzureKeyVaultKmKeyVaultNetworkAccess")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes?) content.GetValueForProperty("AzureKeyVaultKmKeyVaultNetworkAccess",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyVaultNetworkAccess, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes.CreateFrom); + } + if (content.Contains("AzureKeyVaultKmKeyVaultResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyVaultResourceId = (string) content.GetValueForProperty("AzureKeyVaultKmKeyVaultResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).AzureKeyVaultKmKeyVaultResourceId, global::System.Convert.ToString); + } + if (content.Contains("WorkloadIdentityEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).WorkloadIdentityEnabled = (bool?) content.GetValueForProperty("WorkloadIdentityEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).WorkloadIdentityEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleanerEnabled = (bool?) content.GetValueForProperty("ImageCleanerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleanerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("ImageCleanerIntervalHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleanerIntervalHour = (int?) content.GetValueForProperty("ImageCleanerIntervalHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).ImageCleanerIntervalHour, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("SecurityMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal)this).SecurityMonitoringEnabled, (__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(); + } + /// Security profile for the container service cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterSecurityProfileTypeConverter))] + public partial interface IManagedClusterSecurityProfile + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.TypeConverter.cs similarity index 87% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.TypeConverter.cs index a43ebd88b4e2..c9d8b12e93c8 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.TypeConverter.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { 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 ContainerServiceMasterProfileTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class ManagedClusterSecurityProfileTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -26,13 +26,13 @@ public partial class ContainerServiceMasterProfileTypeConverter : global::System 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.Api20200901.IContainerServiceMasterProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile).IsAssignableFrom(type)) { return sourceValue; } try { - return ContainerServiceMasterProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return ManagedClusterSecurityProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -127,11 +127,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContain } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ContainerServiceMasterProfile.DeserializeFromPSObject(sourceValue); + return ManagedClusterSecurityProfile.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ContainerServiceMasterProfile.DeserializeFromDictionary(sourceValue); + return ManagedClusterSecurityProfile.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.cs new file mode 100644 index 000000000000..918e453a753b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.cs @@ -0,0 +1,272 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Security profile for the container service cluster. + public partial class ManagedClusterSecurityProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms _azureKeyVaultKm; + + /// + /// Azure Key Vault [key management service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for + /// the security profile. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms AzureKeyVaultKm { get => (this._azureKeyVaultKm = this._azureKeyVaultKm ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKms()); set => this._azureKeyVaultKm = value; } + + /// Whether to enable Azure Key Vault key management service. The default is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? AzureKeyVaultKmEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).Enabled = value ?? default(bool); } + + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AzureKeyVaultKmKeyId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? AzureKeyVaultKmKeyVaultNetworkAccess { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyVaultNetworkAccess; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyVaultNetworkAccess = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes)""); } + + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string AzureKeyVaultKmKeyVaultResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyVaultResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKmsInternal)AzureKeyVaultKm).KeyVaultResourceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender _defender; + + /// Microsoft Defender settings for the security profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender Defender { get => (this._defender = this._defender ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefender()); set => this._defender = value; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string DefenderLogAnalyticsWorkspaceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)Defender).LogAnalyticsWorkspaceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)Defender).LogAnalyticsWorkspaceResourceId = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner _imageCleaner; + + /// Image Cleaner settings for the security profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner ImageCleaner { get => (this._imageCleaner = this._imageCleaner ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleaner()); set => this._imageCleaner = value; } + + /// 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.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)ImageCleaner).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)ImageCleaner).Enabled = value ?? default(bool); } + + /// Image Cleaner scanning interval in hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? ImageCleanerIntervalHour { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)ImageCleaner).IntervalHour; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)ImageCleaner).IntervalHour = value ?? default(int); } + + /// Internal Acessors for AzureKeyVaultKm + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal.AzureKeyVaultKm { get => (this._azureKeyVaultKm = this._azureKeyVaultKm ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKms()); set { {_azureKeyVaultKm = value;} } } + + /// Internal Acessors for Defender + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal.Defender { get => (this._defender = this._defender ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefender()); set { {_defender = value;} } } + + /// Internal Acessors for DefenderSecurityMonitoring + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal.DefenderSecurityMonitoring { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)Defender).SecurityMonitoring; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)Defender).SecurityMonitoring = value; } + + /// Internal Acessors for ImageCleaner + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal.ImageCleaner { get => (this._imageCleaner = this._imageCleaner ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleaner()); set { {_imageCleaner = value;} } } + + /// Internal Acessors for WorkloadIdentity + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileInternal.WorkloadIdentity { get => (this._workloadIdentity = this._workloadIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentity()); set { {_workloadIdentity = value;} } } + + /// 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.Api20230201.IManagedClusterSecurityProfileDefenderInternal)Defender).SecurityMonitoringEnabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)Defender).SecurityMonitoringEnabled = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity _workloadIdentity; + + /// + /// Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access Azure + /// cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity WorkloadIdentity { get => (this._workloadIdentity = this._workloadIdentity ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentity()); set => this._workloadIdentity = value; } + + /// Whether to enable workload identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? WorkloadIdentityEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentityInternal)WorkloadIdentity).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentityInternal)WorkloadIdentity).Enabled = value ?? default(bool); } + + /// Creates an new instance. + public ManagedClusterSecurityProfile() + { + + } + } + /// Security profile for the container service cluster. + public partial interface IManagedClusterSecurityProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable Azure Key Vault key management service. The default is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Azure Key Vault key management service. The default is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? AzureKeyVaultKmEnabled { get; set; } + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key identifier. When Azure Key Vault key management service is disabled, leave the field empty.", + SerializedName = @"keyId", + 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`. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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`.", + SerializedName = @"keyVaultNetworkAccess", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? AzureKeyVaultKmKeyVaultNetworkAccess { get; set; } + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource ID. When keyVaultNetworkAccess is `Public`, leave the field empty.", + SerializedName = @"keyVaultResourceId", + PossibleTypes = new [] { typeof(string) })] + string AzureKeyVaultKmKeyVaultResourceId { 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"logAnalyticsWorkspaceResourceId", + PossibleTypes = new [] { typeof(string) })] + string DefenderLogAnalyticsWorkspaceResourceId { get; set; } + /// Whether to enable Image Cleaner on AKS cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Image Cleaner on AKS cluster.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? ImageCleanerEnabled { get; set; } + /// Image Cleaner scanning interval in hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image Cleaner scanning interval in hours.", + SerializedName = @"intervalHours", + PossibleTypes = new [] { typeof(int) })] + int? ImageCleanerIntervalHour { get; set; } + /// Whether to enable Defender threat detection + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Defender threat detection", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityMonitoringEnabled { get; set; } + /// Whether to enable workload identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable workload identity.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? WorkloadIdentityEnabled { get; set; } + + } + /// Security profile for the container service cluster. + internal partial interface IManagedClusterSecurityProfileInternal + + { + /// + /// Azure Key Vault [key management service](https://kubernetes.io/docs/tasks/administer-cluster/kms-provider/) settings for + /// the security profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAzureKeyVaultKms AzureKeyVaultKm { get; set; } + /// Whether to enable Azure Key Vault key management service. The default is false. + bool? AzureKeyVaultKmEnabled { get; set; } + /// + /// Identifier of Azure Key Vault key. See [key identifier format](https://docs.microsoft.com/en-us/azure/key-vault/general/about-keys-secrets-certificates#vault-name-and-object-name) + /// for more details. When Azure Key Vault key management service is enabled, this field is required and must be a valid key + /// identifier. When Azure Key Vault key management service is disabled, leave the field empty. + /// + 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`. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes? AzureKeyVaultKmKeyVaultNetworkAccess { get; set; } + /// + /// Resource ID of key vault. When keyVaultNetworkAccess is `Private`, this field is required and must be a valid resource + /// ID. When keyVaultNetworkAccess is `Public`, leave the field empty. + /// + string AzureKeyVaultKmKeyVaultResourceId { get; set; } + /// Microsoft Defender settings for the security profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender Defender { 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. + /// + string DefenderLogAnalyticsWorkspaceResourceId { get; set; } + /// + /// Microsoft Defender threat detection for Cloud settings for the security profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring DefenderSecurityMonitoring { get; set; } + /// Image Cleaner settings for the security profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner ImageCleaner { get; set; } + /// Whether to enable Image Cleaner on AKS cluster. + bool? ImageCleanerEnabled { get; set; } + /// Image Cleaner scanning interval in hours. + int? ImageCleanerIntervalHour { get; set; } + /// Whether to enable Defender threat detection + bool? SecurityMonitoringEnabled { get; set; } + /// + /// Workload identity settings for the security profile. Workload identity enables Kubernetes applications to access Azure + /// cloud resources securely with Azure AD. See https://aka.ms/aks/wi for more details. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity WorkloadIdentity { get; set; } + /// Whether to enable workload identity. + bool? WorkloadIdentityEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.json.cs new file mode 100644 index 000000000000..e8abc6c154aa --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Security profile for the container service cluster. + public partial class ManagedClusterSecurityProfile + { + + /// + /// 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.Api20230201.IManagedClusterSecurityProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterSecurityProfile(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 ManagedClusterSecurityProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_defender = If( json?.PropertyT("defender"), out var __jsonDefender) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefender.FromJson(__jsonDefender) : Defender;} + {_azureKeyVaultKm = If( json?.PropertyT("azureKeyVaultKms"), out var __jsonAzureKeyVaultKms) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.AzureKeyVaultKms.FromJson(__jsonAzureKeyVaultKms) : AzureKeyVaultKm;} + {_workloadIdentity = If( json?.PropertyT("workloadIdentity"), out var __jsonWorkloadIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileWorkloadIdentity.FromJson(__jsonWorkloadIdentity) : WorkloadIdentity;} + {_imageCleaner = If( json?.PropertyT("imageCleaner"), out var __jsonImageCleaner) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileImageCleaner.FromJson(__jsonImageCleaner) : ImageCleaner;} + 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._defender ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._defender.ToJson(null,serializationMode) : null, "defender" ,container.Add ); + 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 ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.PowerShell.cs new file mode 100644 index 000000000000..44bb2788df5b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.PowerShell.cs @@ -0,0 +1,165 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Microsoft Defender settings for the security profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterSecurityProfileDefenderTypeConverter))] + public partial class ManagedClusterSecurityProfileDefender + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterSecurityProfileDefender DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterSecurityProfileDefender(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.Api20230201.IManagedClusterSecurityProfileDefender DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterSecurityProfileDefender(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.Api20230201.IManagedClusterSecurityProfileDefender 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 ManagedClusterSecurityProfileDefender(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecurityMonitoring")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).SecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("SecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).SecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); + } + if (content.Contains("LogAnalyticsWorkspaceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).LogAnalyticsWorkspaceResourceId = (string) content.GetValueForProperty("LogAnalyticsWorkspaceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).LogAnalyticsWorkspaceResourceId, global::System.Convert.ToString); + } + if (content.Contains("SecurityMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).SecurityMonitoringEnabled, (__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 ManagedClusterSecurityProfileDefender(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SecurityMonitoring")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).SecurityMonitoring = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring) content.GetValueForProperty("SecurityMonitoring",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).SecurityMonitoring, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter.ConvertFrom); + } + if (content.Contains("LogAnalyticsWorkspaceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).LogAnalyticsWorkspaceResourceId = (string) content.GetValueForProperty("LogAnalyticsWorkspaceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).LogAnalyticsWorkspaceResourceId, global::System.Convert.ToString); + } + if (content.Contains("SecurityMonitoringEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).SecurityMonitoringEnabled = (bool?) content.GetValueForProperty("SecurityMonitoringEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal)this).SecurityMonitoringEnabled, (__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(); + } + /// Microsoft Defender settings for the security profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterSecurityProfileDefenderTypeConverter))] + public partial interface IManagedClusterSecurityProfileDefender + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.TypeConverter.cs new file mode 100644 index 000000000000..3952ec935d0e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterSecurityProfileDefenderTypeConverter : 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.Api20230201.IManagedClusterSecurityProfileDefender ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterSecurityProfileDefender.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterSecurityProfileDefender.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterSecurityProfileDefender.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.cs new file mode 100644 index 000000000000..d5ad3beb8472 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Microsoft Defender settings for the security profile. + public partial class ManagedClusterSecurityProfileDefender : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal + { + + /// Backing field for property. + private string _logAnalyticsWorkspaceResourceId; + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string LogAnalyticsWorkspaceResourceId { get => this._logAnalyticsWorkspaceResourceId; set => this._logAnalyticsWorkspaceResourceId = value; } + + /// Internal Acessors for SecurityMonitoring + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderInternal.SecurityMonitoring { get => (this._securityMonitoring = this._securityMonitoring ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoring()); set { {_securityMonitoring = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring _securityMonitoring; + + /// + /// Microsoft Defender threat detection for Cloud settings for the security profile. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring SecurityMonitoring { get => (this._securityMonitoring = this._securityMonitoring ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoring()); set => this._securityMonitoring = value; } + + /// 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.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoringInternal)SecurityMonitoring).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoringInternal)SecurityMonitoring).Enabled = value ?? default(bool); } + + /// Creates an new instance. + public ManagedClusterSecurityProfileDefender() + { + + } + } + /// Microsoft Defender settings for the security profile. + public partial interface IManagedClusterSecurityProfileDefender : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"logAnalyticsWorkspaceResourceId", + PossibleTypes = new [] { typeof(string) })] + string LogAnalyticsWorkspaceResourceId { get; set; } + /// Whether to enable Defender threat detection + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Defender threat detection", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? SecurityMonitoringEnabled { get; set; } + + } + /// Microsoft Defender settings for the security profile. + internal partial interface IManagedClusterSecurityProfileDefenderInternal + + { + /// + /// 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. + /// + string LogAnalyticsWorkspaceResourceId { get; set; } + /// + /// Microsoft Defender threat detection for Cloud settings for the security profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring SecurityMonitoring { get; set; } + /// Whether to enable Defender threat detection + bool? SecurityMonitoringEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.json.cs new file mode 100644 index 000000000000..0989838027b7 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefender.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Microsoft Defender settings for the security profile. + public partial class ManagedClusterSecurityProfileDefender + { + + /// + /// 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.Api20230201.IManagedClusterSecurityProfileDefender. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefender FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterSecurityProfileDefender(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 ManagedClusterSecurityProfileDefender(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_securityMonitoring = If( json?.PropertyT("securityMonitoring"), out var __jsonSecurityMonitoring) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterSecurityProfileDefenderSecurityMonitoring.FromJson(__jsonSecurityMonitoring) : SecurityMonitoring;} + {_logAnalyticsWorkspaceResourceId = If( json?.PropertyT("logAnalyticsWorkspaceResourceId"), out var __jsonLogAnalyticsWorkspaceResourceId) ? (string)__jsonLogAnalyticsWorkspaceResourceId : (string)LogAnalyticsWorkspaceResourceId;} + 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._securityMonitoring ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._securityMonitoring.ToJson(null,serializationMode) : null, "securityMonitoring" ,container.Add ); + AddIf( null != (((object)this._logAnalyticsWorkspaceResourceId)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._logAnalyticsWorkspaceResourceId.ToString()) : null, "logAnalyticsWorkspaceResourceId" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.PowerShell.cs new file mode 100644 index 000000000000..43aca83bc2ca --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Microsoft Defender settings for the security profile threat detection. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter))] + public partial class ManagedClusterSecurityProfileDefenderSecurityMonitoring + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterSecurityProfileDefenderSecurityMonitoring(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.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterSecurityProfileDefenderSecurityMonitoring(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.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring 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 ManagedClusterSecurityProfileDefenderSecurityMonitoring(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.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoringInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoringInternal)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 ManagedClusterSecurityProfileDefenderSecurityMonitoring(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.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoringInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoringInternal)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(); + } + /// Microsoft Defender settings for the security profile threat detection. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter))] + public partial interface IManagedClusterSecurityProfileDefenderSecurityMonitoring + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.TypeConverter.cs new file mode 100644 index 000000000000..90d4c6b96e27 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterSecurityProfileDefenderSecurityMonitoringTypeConverter : 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.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterSecurityProfileDefenderSecurityMonitoring.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterSecurityProfileDefenderSecurityMonitoring.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterSecurityProfileDefenderSecurityMonitoring.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.cs new file mode 100644 index 000000000000..ec864dd7f4bc --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Microsoft Defender settings for the security profile threat detection. + public partial class ManagedClusterSecurityProfileDefenderSecurityMonitoring : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoringInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// Whether to enable Defender threat detection + [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 ManagedClusterSecurityProfileDefenderSecurityMonitoring() + { + + } + } + /// Microsoft Defender settings for the security profile threat detection. + public partial interface IManagedClusterSecurityProfileDefenderSecurityMonitoring : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable Defender threat detection + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Defender threat detection", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// Microsoft Defender settings for the security profile threat detection. + internal partial interface IManagedClusterSecurityProfileDefenderSecurityMonitoringInternal + + { + /// Whether to enable Defender threat detection + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.json.cs new file mode 100644 index 000000000000..e9cffee30a86 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileDefenderSecurityMonitoring.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Microsoft Defender settings for the security profile threat detection. + public partial class ManagedClusterSecurityProfileDefenderSecurityMonitoring + { + + /// + /// 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.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileDefenderSecurityMonitoring FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterSecurityProfileDefenderSecurityMonitoring(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 ManagedClusterSecurityProfileDefenderSecurityMonitoring(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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.PowerShell.cs new file mode 100644 index 000000000000..e292eac079aa --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.PowerShell.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here + /// are settings for the security profile. + /// + [System.ComponentModel.TypeConverter(typeof(ManagedClusterSecurityProfileImageCleanerTypeConverter))] + public partial class ManagedClusterSecurityProfileImageCleaner + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterSecurityProfileImageCleaner DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterSecurityProfileImageCleaner(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.Api20230201.IManagedClusterSecurityProfileImageCleaner DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterSecurityProfileImageCleaner(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.Api20230201.IManagedClusterSecurityProfileImageCleaner 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 ManagedClusterSecurityProfileImageCleaner(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.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IntervalHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)this).IntervalHour = (int?) content.GetValueForProperty("IntervalHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)this).IntervalHour, (__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 ManagedClusterSecurityProfileImageCleaner(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.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("IntervalHour")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)this).IntervalHour = (int?) content.GetValueForProperty("IntervalHour",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal)this).IntervalHour, (__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(); + } + /// Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here + /// are settings for the security profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterSecurityProfileImageCleanerTypeConverter))] + public partial interface IManagedClusterSecurityProfileImageCleaner + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.TypeConverter.cs new file mode 100644 index 000000000000..05f180b6ab46 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterSecurityProfileImageCleanerTypeConverter : 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.Api20230201.IManagedClusterSecurityProfileImageCleaner ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterSecurityProfileImageCleaner.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterSecurityProfileImageCleaner.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterSecurityProfileImageCleaner.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.cs new file mode 100644 index 000000000000..d6e4e57f4fbd --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here + /// are settings for the security profile. + /// + public partial class ManagedClusterSecurityProfileImageCleaner : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleanerInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// Whether to enable Image Cleaner on AKS cluster. + [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 int? _intervalHour; + + /// Image Cleaner scanning interval in hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? IntervalHour { get => this._intervalHour; set => this._intervalHour = value; } + + /// + /// Creates an new instance. + /// + public ManagedClusterSecurityProfileImageCleaner() + { + + } + } + /// Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here + /// are settings for the security profile. + public partial interface IManagedClusterSecurityProfileImageCleaner : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable Image Cleaner on AKS cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Image Cleaner on AKS cluster.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + /// Image Cleaner scanning interval in hours. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Image Cleaner scanning interval in hours.", + SerializedName = @"intervalHours", + PossibleTypes = new [] { typeof(int) })] + int? IntervalHour { get; set; } + + } + /// Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here + /// are settings for the security profile. + internal partial interface IManagedClusterSecurityProfileImageCleanerInternal + + { + /// Whether to enable Image Cleaner on AKS cluster. + bool? Enabled { get; set; } + /// Image Cleaner scanning interval in hours. + int? IntervalHour { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.json.cs new file mode 100644 index 000000000000..991ba79c6f03 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileImageCleaner.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Image Cleaner removes unused images from nodes, freeing up disk space and helping to reduce attack surface area. Here + /// are settings for the security profile. + /// + public partial class ManagedClusterSecurityProfileImageCleaner + { + + /// + /// 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.Api20230201.IManagedClusterSecurityProfileImageCleaner. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileImageCleaner FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterSecurityProfileImageCleaner(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 ManagedClusterSecurityProfileImageCleaner(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;} + {_intervalHour = If( json?.PropertyT("intervalHours"), out var __jsonIntervalHours) ? (int?)__jsonIntervalHours : IntervalHour;} + 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 ); + AddIf( null != this._intervalHour ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._intervalHour) : null, "intervalHours" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.PowerShell.cs new file mode 100644 index 000000000000..4b73f24f12ca --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Workload identity settings for the security profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterSecurityProfileWorkloadIdentityTypeConverter))] + public partial class ManagedClusterSecurityProfileWorkloadIdentity + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterSecurityProfileWorkloadIdentity(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.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterSecurityProfileWorkloadIdentity(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.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity 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 ManagedClusterSecurityProfileWorkloadIdentity(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.Api20230201.IManagedClusterSecurityProfileWorkloadIdentityInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentityInternal)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 ManagedClusterSecurityProfileWorkloadIdentity(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.Api20230201.IManagedClusterSecurityProfileWorkloadIdentityInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentityInternal)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(); + } + /// Workload identity settings for the security profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterSecurityProfileWorkloadIdentityTypeConverter))] + public partial interface IManagedClusterSecurityProfileWorkloadIdentity + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.TypeConverter.cs new file mode 100644 index 000000000000..b84c3d3208a0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterSecurityProfileWorkloadIdentityTypeConverter : 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.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterSecurityProfileWorkloadIdentity.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterSecurityProfileWorkloadIdentity.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterSecurityProfileWorkloadIdentity.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.cs new file mode 100644 index 000000000000..a6726525cca5 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Workload identity settings for the security profile. + public partial class ManagedClusterSecurityProfileWorkloadIdentity : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentityInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// Whether to enable workload identity. + [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 ManagedClusterSecurityProfileWorkloadIdentity() + { + + } + } + /// Workload identity settings for the security profile. + public partial interface IManagedClusterSecurityProfileWorkloadIdentity : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable workload identity. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable workload identity.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// Workload identity settings for the security profile. + internal partial interface IManagedClusterSecurityProfileWorkloadIdentityInternal + + { + /// Whether to enable workload identity. + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.json.cs new file mode 100644 index 000000000000..bdae1f797738 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSecurityProfileWorkloadIdentity.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Workload identity settings for the security profile. + public partial class ManagedClusterSecurityProfileWorkloadIdentity + { + + /// + /// 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.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSecurityProfileWorkloadIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterSecurityProfileWorkloadIdentity(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 ManagedClusterSecurityProfileWorkloadIdentity(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/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.PowerShell.cs similarity index 88% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.PowerShell.cs index 5f88ab9037c0..4b223ce1f2c3 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -57,29 +57,29 @@ public partial class ManagedClusterServicePrincipalProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterServicePrincipalProfile(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterServicePrincipalProfile(content); } @@ -92,10 +92,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile 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. @@ -110,17 +110,17 @@ internal ManagedClusterServicePrincipalProfile(global::System.Collections.IDicti // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("Secret")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)this).Secret = (string) content.GetValueForProperty("Secret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)this).Secret, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)this).Secret = (string) content.GetValueForProperty("Secret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)this).Secret, 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. @@ -135,11 +135,11 @@ internal ManagedClusterServicePrincipalProfile(global::System.Management.Automat // actually deserialize if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("Secret")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)this).Secret = (string) content.GetValueForProperty("Secret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal)this).Secret, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)this).Secret = (string) content.GetValueForProperty("Secret",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal)this).Secret, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.TypeConverter.cs index 0ed724884800..a63d859a0e19 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -109,14 +109,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.cs index 7a4ff28cd1d0..061090cb2eb0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -11,8 +11,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 /// Information about a service principal identity for the cluster to use for manipulating Azure APIs. /// public partial class ManagedClusterServicePrincipalProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfileInternal { /// Backing field for property. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.json.cs index 6eac62ed505d..b48400ce0e2d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterServicePrincipalProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterServicePrincipalProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -56,13 +56,13 @@ public partial class ManagedClusterServicePrincipalProfile 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.Api20200901.IManagedClusterServicePrincipalProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterServicePrincipalProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterServicePrincipalProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterServicePrincipalProfile(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.PowerShell.cs similarity index 86% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.PowerShell.cs index 08edd3df70d6..0ece56719536 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.PowerShell.cs @@ -3,10 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + /// The SKU of a Managed Cluster. [System.ComponentModel.TypeConverter(typeof(ManagedClusterSkuTypeConverter))] public partial class ManagedClusterSku { @@ -54,27 +55,27 @@ public partial class ManagedClusterSku partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IManagedClusterSku DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterSku(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.Api20200901.IManagedClusterSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterSku(content); } @@ -84,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged ///
/// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku 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. @@ -102,17 +103,17 @@ internal ManagedClusterSku(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName.CreateFrom); } if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier.CreateFrom); } 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. @@ -127,11 +128,11 @@ internal ManagedClusterSku(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)this).Name = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName?) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)this).Name, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName.CreateFrom); } if (content.Contains("Tier")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)this).Tier = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier?) content.GetValueForProperty("Tier",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal)this).Tier, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier.CreateFrom); } AfterDeserializePSObject(content); } @@ -141,6 +142,7 @@ internal ManagedClusterSku(global::System.Management.Automation.PSObject content /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } + /// The SKU of a Managed Cluster. [System.ComponentModel.TypeConverter(typeof(ManagedClusterSkuTypeConverter))] public partial interface IManagedClusterSku diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.TypeConverter.cs index 069c9fff935a..2973c76a7110 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.cs similarity index 64% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.cs index 665a5d8da8d8..153b27adc68f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.cs @@ -3,26 +3,30 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + /// The SKU of a Managed Cluster. public partial class ManagedClusterSku : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSkuInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSkuInternal { /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName? _name; - /// Name of a managed cluster SKU. + /// The name of a managed cluster SKU. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName? Name { get => this._name; set => this._name = value; } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier? _tier; - /// 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)] public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier? Tier { get => this._tier; set => this._tier = value; } @@ -32,33 +36,41 @@ public ManagedClusterSku() } } + /// The SKU of a Managed Cluster. public partial interface IManagedClusterSku : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// Name of a managed cluster SKU. + /// The name of a managed cluster SKU. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Name of a managed cluster SKU.", + Description = @"The name of a managed cluster SKU.", SerializedName = @"name", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName? Name { get; set; } - /// 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( Required = false, ReadOnly = false, - Description = @"Tier of a managed cluster SKU.", + 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.", SerializedName = @"tier", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier? Tier { get; set; } } + /// The SKU of a Managed Cluster. internal partial interface IManagedClusterSkuInternal { - /// Name of a managed cluster SKU. + /// The name of a managed cluster SKU. Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName? Name { get; set; } - /// 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.Support.ManagedClusterSkuTier? Tier { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.json.cs index 95eb7d7fe5dd..4cc5a11e9e92 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterSku.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterSku.json.cs @@ -3,10 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + /// The SKU of a Managed Cluster. public partial class ManagedClusterSku { @@ -53,13 +54,13 @@ public partial class ManagedClusterSku 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.Api20200901.IManagedClusterSku. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterSku FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterSku(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.PowerShell.cs new file mode 100644 index 000000000000..59fcf33c1f53 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.PowerShell.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Storage profile for the container service cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStorageProfileTypeConverter))] + public partial class ManagedClusterStorageProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterStorageProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterStorageProfile(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.Api20230201.IManagedClusterStorageProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterStorageProfile(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.Api20230201.IManagedClusterStorageProfile 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 ManagedClusterStorageProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DiskCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).DiskCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver) content.GetValueForProperty("DiskCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).DiskCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("FileCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).FileCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver) content.GetValueForProperty("FileCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).FileCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("SnapshotController")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).SnapshotController = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController) content.GetValueForProperty("SnapshotController",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).SnapshotController, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotControllerTypeConverter.ConvertFrom); + } + if (content.Contains("BlobCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).BlobCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver) content.GetValueForProperty("BlobCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).BlobCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("DiskCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).DiskCsiDriverEnabled = (bool?) content.GetValueForProperty("DiskCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).DiskCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("FileCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).FileCsiDriverEnabled = (bool?) content.GetValueForProperty("FileCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).FileCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SnapshotControllerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).SnapshotControllerEnabled = (bool?) content.GetValueForProperty("SnapshotControllerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).SnapshotControllerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BlobCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).BlobCsiDriverEnabled = (bool?) content.GetValueForProperty("BlobCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).BlobCsiDriverEnabled, (__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 ManagedClusterStorageProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("DiskCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).DiskCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver) content.GetValueForProperty("DiskCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).DiskCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("FileCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).FileCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver) content.GetValueForProperty("FileCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).FileCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("SnapshotController")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).SnapshotController = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController) content.GetValueForProperty("SnapshotController",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).SnapshotController, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotControllerTypeConverter.ConvertFrom); + } + if (content.Contains("BlobCsiDriver")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).BlobCsiDriver = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver) content.GetValueForProperty("BlobCsiDriver",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).BlobCsiDriver, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriverTypeConverter.ConvertFrom); + } + if (content.Contains("DiskCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).DiskCsiDriverEnabled = (bool?) content.GetValueForProperty("DiskCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).DiskCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("FileCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).FileCsiDriverEnabled = (bool?) content.GetValueForProperty("FileCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).FileCsiDriverEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("SnapshotControllerEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).SnapshotControllerEnabled = (bool?) content.GetValueForProperty("SnapshotControllerEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).SnapshotControllerEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("BlobCsiDriverEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).BlobCsiDriverEnabled = (bool?) content.GetValueForProperty("BlobCsiDriverEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal)this).BlobCsiDriverEnabled, (__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(); + } + /// Storage profile for the container service cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStorageProfileTypeConverter))] + public partial interface IManagedClusterStorageProfile + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.TypeConverter.cs new file mode 100644 index 000000000000..c82e3e7d4f52 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterStorageProfileTypeConverter : 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.Api20230201.IManagedClusterStorageProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterStorageProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterStorageProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterStorageProfile.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.cs new file mode 100644 index 000000000000..95c4d5388f50 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.cs @@ -0,0 +1,138 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Storage profile for the container service cluster. + public partial class ManagedClusterStorageProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver _blobCsiDriver; + + /// AzureBlob CSI Driver settings for the storage profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver BlobCsiDriver { get => (this._blobCsiDriver = this._blobCsiDriver ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriver()); set => this._blobCsiDriver = value; } + + /// Whether to enable AzureBlob CSI Driver. The default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? BlobCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriverInternal)BlobCsiDriver).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriverInternal)BlobCsiDriver).Enabled = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver _diskCsiDriver; + + /// AzureDisk CSI Driver settings for the storage profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver DiskCsiDriver { get => (this._diskCsiDriver = this._diskCsiDriver ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriver()); set => this._diskCsiDriver = value; } + + /// Whether to enable AzureDisk CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? DiskCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriverInternal)DiskCsiDriver).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriverInternal)DiskCsiDriver).Enabled = value ?? default(bool); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver _fileCsiDriver; + + /// AzureFile CSI Driver settings for the storage profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver FileCsiDriver { get => (this._fileCsiDriver = this._fileCsiDriver ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriver()); set => this._fileCsiDriver = value; } + + /// Whether to enable AzureFile CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? FileCsiDriverEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriverInternal)FileCsiDriver).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriverInternal)FileCsiDriver).Enabled = value ?? default(bool); } + + /// Internal Acessors for BlobCsiDriver + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal.BlobCsiDriver { get => (this._blobCsiDriver = this._blobCsiDriver ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriver()); set { {_blobCsiDriver = value;} } } + + /// Internal Acessors for DiskCsiDriver + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal.DiskCsiDriver { get => (this._diskCsiDriver = this._diskCsiDriver ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriver()); set { {_diskCsiDriver = value;} } } + + /// Internal Acessors for FileCsiDriver + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal.FileCsiDriver { get => (this._fileCsiDriver = this._fileCsiDriver ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriver()); set { {_fileCsiDriver = value;} } } + + /// Internal Acessors for SnapshotController + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileInternal.SnapshotController { get => (this._snapshotController = this._snapshotController ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotController()); set { {_snapshotController = value;} } } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController _snapshotController; + + /// Snapshot Controller settings for the storage profile. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController SnapshotController { get => (this._snapshotController = this._snapshotController ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotController()); set => this._snapshotController = value; } + + /// Whether to enable Snapshot Controller. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? SnapshotControllerEnabled { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotControllerInternal)SnapshotController).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotControllerInternal)SnapshotController).Enabled = value ?? default(bool); } + + /// Creates an new instance. + public ManagedClusterStorageProfile() + { + + } + } + /// Storage profile for the container service cluster. + public partial interface IManagedClusterStorageProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable AzureBlob CSI Driver. The default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureBlob CSI Driver. The default value is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? BlobCsiDriverEnabled { get; set; } + /// Whether to enable AzureDisk CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureDisk CSI Driver. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? DiskCsiDriverEnabled { get; set; } + /// Whether to enable AzureFile CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureFile CSI Driver. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? FileCsiDriverEnabled { get; set; } + /// Whether to enable Snapshot Controller. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Snapshot Controller. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? SnapshotControllerEnabled { get; set; } + + } + /// Storage profile for the container service cluster. + internal partial interface IManagedClusterStorageProfileInternal + + { + /// AzureBlob CSI Driver settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver BlobCsiDriver { get; set; } + /// Whether to enable AzureBlob CSI Driver. The default value is false. + bool? BlobCsiDriverEnabled { get; set; } + /// AzureDisk CSI Driver settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver DiskCsiDriver { get; set; } + /// Whether to enable AzureDisk CSI Driver. The default value is true. + bool? DiskCsiDriverEnabled { get; set; } + /// AzureFile CSI Driver settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver FileCsiDriver { get; set; } + /// Whether to enable AzureFile CSI Driver. The default value is true. + bool? FileCsiDriverEnabled { get; set; } + /// Snapshot Controller settings for the storage profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController SnapshotController { get; set; } + /// Whether to enable Snapshot Controller. The default value is true. + bool? SnapshotControllerEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.json.cs new file mode 100644 index 000000000000..13dcfb12c728 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Storage profile for the container service cluster. + public partial class ManagedClusterStorageProfile + { + + /// + /// 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.Api20230201.IManagedClusterStorageProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterStorageProfile(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 ManagedClusterStorageProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_diskCsiDriver = If( json?.PropertyT("diskCSIDriver"), out var __jsonDiskCsiDriver) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileDiskCsiDriver.FromJson(__jsonDiskCsiDriver) : DiskCsiDriver;} + {_fileCsiDriver = If( json?.PropertyT("fileCSIDriver"), out var __jsonFileCsiDriver) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileFileCsiDriver.FromJson(__jsonFileCsiDriver) : FileCsiDriver;} + {_snapshotController = If( json?.PropertyT("snapshotController"), out var __jsonSnapshotController) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileSnapshotController.FromJson(__jsonSnapshotController) : SnapshotController;} + {_blobCsiDriver = If( json?.PropertyT("blobCSIDriver"), out var __jsonBlobCsiDriver) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterStorageProfileBlobCsiDriver.FromJson(__jsonBlobCsiDriver) : BlobCsiDriver;} + 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._diskCsiDriver ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._diskCsiDriver.ToJson(null,serializationMode) : null, "diskCSIDriver" ,container.Add ); + AddIf( null != this._fileCsiDriver ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._fileCsiDriver.ToJson(null,serializationMode) : null, "fileCSIDriver" ,container.Add ); + AddIf( null != this._snapshotController ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._snapshotController.ToJson(null,serializationMode) : null, "snapshotController" ,container.Add ); + AddIf( null != this._blobCsiDriver ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._blobCsiDriver.ToJson(null,serializationMode) : null, "blobCSIDriver" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.PowerShell.cs new file mode 100644 index 000000000000..9703d5d5e2f5 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// AzureBlob CSI Driver settings for the storage profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStorageProfileBlobCsiDriverTypeConverter))] + public partial class ManagedClusterStorageProfileBlobCsiDriver + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterStorageProfileBlobCsiDriver DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterStorageProfileBlobCsiDriver(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.Api20230201.IManagedClusterStorageProfileBlobCsiDriver DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterStorageProfileBlobCsiDriver(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.Api20230201.IManagedClusterStorageProfileBlobCsiDriver 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 ManagedClusterStorageProfileBlobCsiDriver(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.Api20230201.IManagedClusterStorageProfileBlobCsiDriverInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriverInternal)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 ManagedClusterStorageProfileBlobCsiDriver(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.Api20230201.IManagedClusterStorageProfileBlobCsiDriverInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriverInternal)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(); + } + /// AzureBlob CSI Driver settings for the storage profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStorageProfileBlobCsiDriverTypeConverter))] + public partial interface IManagedClusterStorageProfileBlobCsiDriver + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.TypeConverter.cs new file mode 100644 index 000000000000..ed6b1577df2d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterStorageProfileBlobCsiDriverTypeConverter : 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.Api20230201.IManagedClusterStorageProfileBlobCsiDriver ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterStorageProfileBlobCsiDriver.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterStorageProfileBlobCsiDriver.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterStorageProfileBlobCsiDriver.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.cs new file mode 100644 index 000000000000..4f2829cc940d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// AzureBlob CSI Driver settings for the storage profile. + public partial class ManagedClusterStorageProfileBlobCsiDriver : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriverInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// Whether to enable AzureBlob CSI Driver. The 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 ManagedClusterStorageProfileBlobCsiDriver() + { + + } + } + /// AzureBlob CSI Driver settings for the storage profile. + public partial interface IManagedClusterStorageProfileBlobCsiDriver : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable AzureBlob CSI Driver. The default value is false. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureBlob CSI Driver. The default value is false.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// AzureBlob CSI Driver settings for the storage profile. + internal partial interface IManagedClusterStorageProfileBlobCsiDriverInternal + + { + /// Whether to enable AzureBlob CSI Driver. The default value is false. + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.json.cs new file mode 100644 index 000000000000..4751d49c1614 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileBlobCsiDriver.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// AzureBlob CSI Driver settings for the storage profile. + public partial class ManagedClusterStorageProfileBlobCsiDriver + { + + /// + /// 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.Api20230201.IManagedClusterStorageProfileBlobCsiDriver. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileBlobCsiDriver FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterStorageProfileBlobCsiDriver(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 ManagedClusterStorageProfileBlobCsiDriver(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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.PowerShell.cs new file mode 100644 index 000000000000..db714c92d2bd --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// AzureDisk CSI Driver settings for the storage profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStorageProfileDiskCsiDriverTypeConverter))] + public partial class ManagedClusterStorageProfileDiskCsiDriver + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterStorageProfileDiskCsiDriver DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterStorageProfileDiskCsiDriver(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.Api20230201.IManagedClusterStorageProfileDiskCsiDriver DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterStorageProfileDiskCsiDriver(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.Api20230201.IManagedClusterStorageProfileDiskCsiDriver 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 ManagedClusterStorageProfileDiskCsiDriver(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.Api20230201.IManagedClusterStorageProfileDiskCsiDriverInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriverInternal)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 ManagedClusterStorageProfileDiskCsiDriver(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.Api20230201.IManagedClusterStorageProfileDiskCsiDriverInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriverInternal)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(); + } + /// AzureDisk CSI Driver settings for the storage profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStorageProfileDiskCsiDriverTypeConverter))] + public partial interface IManagedClusterStorageProfileDiskCsiDriver + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.TypeConverter.cs new file mode 100644 index 000000000000..cde16e65e61d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterStorageProfileDiskCsiDriverTypeConverter : 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.Api20230201.IManagedClusterStorageProfileDiskCsiDriver ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterStorageProfileDiskCsiDriver.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterStorageProfileDiskCsiDriver.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterStorageProfileDiskCsiDriver.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.cs new file mode 100644 index 000000000000..59b2741fe452 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// AzureDisk CSI Driver settings for the storage profile. + public partial class ManagedClusterStorageProfileDiskCsiDriver : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriverInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// Whether to enable AzureDisk CSI Driver. The default value is true. + [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 ManagedClusterStorageProfileDiskCsiDriver() + { + + } + } + /// AzureDisk CSI Driver settings for the storage profile. + public partial interface IManagedClusterStorageProfileDiskCsiDriver : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable AzureDisk CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureDisk CSI Driver. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// AzureDisk CSI Driver settings for the storage profile. + internal partial interface IManagedClusterStorageProfileDiskCsiDriverInternal + + { + /// Whether to enable AzureDisk CSI Driver. The default value is true. + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.json.cs new file mode 100644 index 000000000000..63e086e376a4 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileDiskCsiDriver.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// AzureDisk CSI Driver settings for the storage profile. + public partial class ManagedClusterStorageProfileDiskCsiDriver + { + + /// + /// 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.Api20230201.IManagedClusterStorageProfileDiskCsiDriver. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileDiskCsiDriver FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterStorageProfileDiskCsiDriver(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 ManagedClusterStorageProfileDiskCsiDriver(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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.PowerShell.cs new file mode 100644 index 000000000000..eec12b503b56 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// AzureFile CSI Driver settings for the storage profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStorageProfileFileCsiDriverTypeConverter))] + public partial class ManagedClusterStorageProfileFileCsiDriver + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterStorageProfileFileCsiDriver DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterStorageProfileFileCsiDriver(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.Api20230201.IManagedClusterStorageProfileFileCsiDriver DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterStorageProfileFileCsiDriver(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.Api20230201.IManagedClusterStorageProfileFileCsiDriver 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 ManagedClusterStorageProfileFileCsiDriver(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.Api20230201.IManagedClusterStorageProfileFileCsiDriverInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriverInternal)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 ManagedClusterStorageProfileFileCsiDriver(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.Api20230201.IManagedClusterStorageProfileFileCsiDriverInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriverInternal)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(); + } + /// AzureFile CSI Driver settings for the storage profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStorageProfileFileCsiDriverTypeConverter))] + public partial interface IManagedClusterStorageProfileFileCsiDriver + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.TypeConverter.cs new file mode 100644 index 000000000000..aff635a4e23c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterStorageProfileFileCsiDriverTypeConverter : 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.Api20230201.IManagedClusterStorageProfileFileCsiDriver ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterStorageProfileFileCsiDriver.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterStorageProfileFileCsiDriver.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterStorageProfileFileCsiDriver.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.cs new file mode 100644 index 000000000000..2c66a1a9cd72 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// AzureFile CSI Driver settings for the storage profile. + public partial class ManagedClusterStorageProfileFileCsiDriver : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriverInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// Whether to enable AzureFile CSI Driver. The default value is true. + [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 ManagedClusterStorageProfileFileCsiDriver() + { + + } + } + /// AzureFile CSI Driver settings for the storage profile. + public partial interface IManagedClusterStorageProfileFileCsiDriver : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable AzureFile CSI Driver. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable AzureFile CSI Driver. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// AzureFile CSI Driver settings for the storage profile. + internal partial interface IManagedClusterStorageProfileFileCsiDriverInternal + + { + /// Whether to enable AzureFile CSI Driver. The default value is true. + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.json.cs new file mode 100644 index 000000000000..064a602e556b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileFileCsiDriver.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// AzureFile CSI Driver settings for the storage profile. + public partial class ManagedClusterStorageProfileFileCsiDriver + { + + /// + /// 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.Api20230201.IManagedClusterStorageProfileFileCsiDriver. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileFileCsiDriver FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterStorageProfileFileCsiDriver(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 ManagedClusterStorageProfileFileCsiDriver(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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.PowerShell.cs new file mode 100644 index 000000000000..2d00599163eb --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Snapshot Controller settings for the storage profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStorageProfileSnapshotControllerTypeConverter))] + public partial class ManagedClusterStorageProfileSnapshotController + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterStorageProfileSnapshotController DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterStorageProfileSnapshotController(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.Api20230201.IManagedClusterStorageProfileSnapshotController DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterStorageProfileSnapshotController(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.Api20230201.IManagedClusterStorageProfileSnapshotController 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 ManagedClusterStorageProfileSnapshotController(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.Api20230201.IManagedClusterStorageProfileSnapshotControllerInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotControllerInternal)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 ManagedClusterStorageProfileSnapshotController(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.Api20230201.IManagedClusterStorageProfileSnapshotControllerInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotControllerInternal)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(); + } + /// Snapshot Controller settings for the storage profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterStorageProfileSnapshotControllerTypeConverter))] + public partial interface IManagedClusterStorageProfileSnapshotController + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.TypeConverter.cs new file mode 100644 index 000000000000..ce9d43bfcd47 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterStorageProfileSnapshotControllerTypeConverter : 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.Api20230201.IManagedClusterStorageProfileSnapshotController ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterStorageProfileSnapshotController.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterStorageProfileSnapshotController.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterStorageProfileSnapshotController.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.cs new file mode 100644 index 000000000000..dfc772717910 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Snapshot Controller settings for the storage profile. + public partial class ManagedClusterStorageProfileSnapshotController : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotControllerInternal + { + + /// Backing field for property. + private bool? _enabled; + + /// Whether to enable Snapshot Controller. The default value is true. + [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 ManagedClusterStorageProfileSnapshotController() + { + + } + } + /// Snapshot Controller settings for the storage profile. + public partial interface IManagedClusterStorageProfileSnapshotController : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable Snapshot Controller. The default value is true. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable Snapshot Controller. The default value is true.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? Enabled { get; set; } + + } + /// Snapshot Controller settings for the storage profile. + internal partial interface IManagedClusterStorageProfileSnapshotControllerInternal + + { + /// Whether to enable Snapshot Controller. The default value is true. + bool? Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.json.cs new file mode 100644 index 000000000000..3321e57051c3 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterStorageProfileSnapshotController.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Snapshot Controller settings for the storage profile. + public partial class ManagedClusterStorageProfileSnapshotController + { + + /// + /// 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.Api20230201.IManagedClusterStorageProfileSnapshotController. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterStorageProfileSnapshotController FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterStorageProfileSnapshotController(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 ManagedClusterStorageProfileSnapshotController(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/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.PowerShell.cs similarity index 75% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.PowerShell.cs index fe899497a216..8dd59716fe01 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ManagedClusterUpgradeProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IManagedClusterUpgradeProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterUpgradeProfile(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.Api20200901.IManagedClusterUpgradeProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterUpgradeProfile(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged ///
/// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile 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. @@ -103,49 +103,49 @@ internal ManagedClusterUpgradeProfile(global::System.Collections.IDictionary con // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterUpgradeProfilePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterUpgradeProfilePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ControlPlaneProfile")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile) content.GetValueForProperty("ControlPlaneProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile) content.GetValueForProperty("ControlPlaneProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom); } if (content.Contains("AgentPoolProfile")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom)); } if (content.Contains("ControlPlaneProfileOSType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileOSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("ControlPlaneProfileOSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileOSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileOSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("ControlPlaneProfileOSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileOSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); } if (content.Contains("ControlPlaneProfileKubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileKubernetesVersion = (string) content.GetValueForProperty("ControlPlaneProfileKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileKubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileKubernetesVersion = (string) content.GetValueForProperty("ControlPlaneProfileKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileKubernetesVersion, global::System.Convert.ToString); } if (content.Contains("ControlPlaneProfileName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileName = (string) content.GetValueForProperty("ControlPlaneProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileName = (string) content.GetValueForProperty("ControlPlaneProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileName, global::System.Convert.ToString); } if (content.Contains("ControlPlaneProfileUpgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("ControlPlaneProfileUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileUpgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("ControlPlaneProfileUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileUpgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.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. @@ -160,43 +160,43 @@ internal ManagedClusterUpgradeProfile(global::System.Management.Automation.PSObj // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterUpgradeProfilePropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterUpgradeProfilePropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("ControlPlaneProfile")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile) content.GetValueForProperty("ControlPlaneProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile) content.GetValueForProperty("ControlPlaneProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom); } if (content.Contains("AgentPoolProfile")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom)); } if (content.Contains("ControlPlaneProfileOSType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileOSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("ControlPlaneProfileOSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileOSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileOSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("ControlPlaneProfileOSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileOSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); } if (content.Contains("ControlPlaneProfileKubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileKubernetesVersion = (string) content.GetValueForProperty("ControlPlaneProfileKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileKubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileKubernetesVersion = (string) content.GetValueForProperty("ControlPlaneProfileKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileKubernetesVersion, global::System.Convert.ToString); } if (content.Contains("ControlPlaneProfileName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileName = (string) content.GetValueForProperty("ControlPlaneProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileName = (string) content.GetValueForProperty("ControlPlaneProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileName, global::System.Convert.ToString); } if (content.Contains("ControlPlaneProfileUpgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("ControlPlaneProfileUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileUpgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("ControlPlaneProfileUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal)this).ControlPlaneProfileUpgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.TypeConverter.cs index 7a5232b8383c..59cb0896ce2a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.cs similarity index 68% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.cs index c7ffbbc13c47..f1a50f9560e7 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.cs @@ -3,78 +3,76 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// The list of available upgrades for compute pools. public partial class ManagedClusterUpgradeProfile : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal { /// The list of available upgrade versions for agent pools. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).AgentPoolProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).AgentPoolProfile = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).AgentPoolProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).AgentPoolProfile = value ; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string ControlPlaneProfileKubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileKubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileKubernetesVersion = value ; } + public string ControlPlaneProfileKubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileKubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileKubernetesVersion = value ; } - /// Pool name. + /// The Agent Pool name. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string ControlPlaneProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileName = value ?? null; } + public string ControlPlaneProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileName = value ?? null; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType ControlPlaneProfileOSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileOSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileOSType = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType ControlPlaneProfileOSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileOSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileOSType = value ; } /// List of orchestrator types and versions available for upgrade. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileUpgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileUpgrade = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileUpgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfileUpgrade = value ?? null /* arrayOf */; } /// Backing field for property. private string _id; - /// Id of upgrade profile. + /// The ID of the upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Id { get => this._id; } /// Internal Acessors for ControlPlaneProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal.ControlPlaneProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfile = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal.ControlPlaneProfile { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfile; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)Property).ControlPlaneProfile = value; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterUpgradeProfileProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterUpgradeProfileProperties()); set { {_property = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; - /// Name of upgrade profile. + /// The name of the upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Name { get => this._name; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties _property; - /// Properties of upgrade profile. + /// The properties of the upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterUpgradeProfileProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterUpgradeProfileProperties()); set => this._property = value; } /// Backing field for property. private string _type; - /// Type of upgrade profile. + /// The type of the upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Type { get => this._type; } @@ -94,31 +92,29 @@ public partial interface IManagedClusterUpgradeProfile : ReadOnly = false, Description = @"The list of available upgrade versions for agent pools.", SerializedName = @"agentPoolProfiles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get; set; } - /// Kubernetes version (major, minor, patch). + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get; set; } + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Kubernetes version (major, minor, patch).", + Description = @"The Kubernetes version (major.minor.patch).", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] string ControlPlaneProfileKubernetesVersion { get; set; } - /// Pool name. + /// The Agent Pool name. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Pool name.", + Description = @"The Agent Pool name.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string ControlPlaneProfileName { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.", + Description = @"The operating system type. The default is Linux.", SerializedName = @"osType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType ControlPlaneProfileOSType { get; set; } @@ -128,29 +124,29 @@ public partial interface IManagedClusterUpgradeProfile : ReadOnly = false, Description = @"List of orchestrator types and versions available for upgrade.", SerializedName = @"upgrades", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get; set; } - /// Id of upgrade profile. + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get; set; } + /// The ID of the upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Id of upgrade profile.", + Description = @"The ID of the upgrade profile.", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; } - /// Name of upgrade profile. + /// The name of the upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Name of upgrade profile.", + Description = @"The name of the upgrade profile.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; } - /// Type of upgrade profile. + /// The type of the upgrade profile. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"Type of upgrade profile.", + Description = @"The type of the upgrade profile.", SerializedName = @"type", PossibleTypes = new [] { typeof(string) })] string Type { get; } @@ -161,26 +157,24 @@ internal partial interface IManagedClusterUpgradeProfileInternal { /// The list of available upgrade versions for agent pools. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get; set; } /// The list of available upgrade versions for the control plane. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile ControlPlaneProfile { get; set; } - /// Kubernetes version (major, minor, patch). + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile ControlPlaneProfile { get; set; } + /// The Kubernetes version (major.minor.patch). string ControlPlaneProfileKubernetesVersion { get; set; } - /// Pool name. + /// The Agent Pool name. string ControlPlaneProfileName { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType ControlPlaneProfileOSType { get; set; } /// List of orchestrator types and versions available for upgrade. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get; set; } - /// Id of upgrade profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get; set; } + /// The ID of the upgrade profile. string Id { get; set; } - /// Name of upgrade profile. + /// The name of the upgrade profile. string Name { get; set; } - /// Properties of upgrade profile. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties Property { get; set; } - /// Type of upgrade profile. + /// The properties of the upgrade profile. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties Property { get; set; } + /// The type of the upgrade profile. string Type { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.json.cs index f9dcb8dafeaa..90347b86f090 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfile.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterUpgradeProfile 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.Api20200901.IManagedClusterUpgradeProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterUpgradeProfile(json) : null; } @@ -77,7 +77,7 @@ internal ManagedClusterUpgradeProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Run { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterUpgradeProfileProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterUpgradeProfileProperties.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;} diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.PowerShell.cs similarity index 79% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.PowerShell.cs index b8f81660f1b9..b4e98d0c3202 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class ManagedClusterUpgradeProfileProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ManagedClusterUpgradeProfileProperties(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ManagedClusterUpgradeProfileProperties(content); } @@ -90,10 +90,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties 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. @@ -108,33 +108,33 @@ internal ManagedClusterUpgradeProfileProperties(global::System.Collections.IDict // actually deserialize if (content.Contains("ControlPlaneProfile")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile) content.GetValueForProperty("ControlPlaneProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile) content.GetValueForProperty("ControlPlaneProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom); } if (content.Contains("AgentPoolProfile")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom)); } if (content.Contains("ControlPlaneProfileOSType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileOSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("ControlPlaneProfileOSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileOSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileOSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("ControlPlaneProfileOSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileOSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); } if (content.Contains("ControlPlaneProfileKubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileKubernetesVersion = (string) content.GetValueForProperty("ControlPlaneProfileKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileKubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileKubernetesVersion = (string) content.GetValueForProperty("ControlPlaneProfileKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileKubernetesVersion, global::System.Convert.ToString); } if (content.Contains("ControlPlaneProfileName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileName = (string) content.GetValueForProperty("ControlPlaneProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileName = (string) content.GetValueForProperty("ControlPlaneProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileName, global::System.Convert.ToString); } if (content.Contains("ControlPlaneProfileUpgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("ControlPlaneProfileUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileUpgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("ControlPlaneProfileUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileUpgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.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. @@ -149,27 +149,27 @@ internal ManagedClusterUpgradeProfileProperties(global::System.Management.Automa // actually deserialize if (content.Contains("ControlPlaneProfile")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile) content.GetValueForProperty("ControlPlaneProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile) content.GetValueForProperty("ControlPlaneProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom); } if (content.Contains("AgentPoolProfile")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).AgentPoolProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[]) content.GetValueForProperty("AgentPoolProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).AgentPoolProfile, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileTypeConverter.ConvertFrom)); } if (content.Contains("ControlPlaneProfileOSType")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileOSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("ControlPlaneProfileOSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileOSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileOSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) content.GetValueForProperty("ControlPlaneProfileOSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileOSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); } if (content.Contains("ControlPlaneProfileKubernetesVersion")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileKubernetesVersion = (string) content.GetValueForProperty("ControlPlaneProfileKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileKubernetesVersion, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileKubernetesVersion = (string) content.GetValueForProperty("ControlPlaneProfileKubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileKubernetesVersion, global::System.Convert.ToString); } if (content.Contains("ControlPlaneProfileName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileName = (string) content.GetValueForProperty("ControlPlaneProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileName, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileName = (string) content.GetValueForProperty("ControlPlaneProfileName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileName, global::System.Convert.ToString); } if (content.Contains("ControlPlaneProfileUpgrade")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("ControlPlaneProfileUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileUpgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileUpgrade = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[]) content.GetValueForProperty("ControlPlaneProfileUpgrade",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal)this).ControlPlaneProfileUpgrade, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfileUpgradesItemTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.TypeConverter.cs index 72a83bdeacd4..9d0269fe460d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -110,14 +110,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.cs similarity index 71% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.cs index c3fd44ad8afc..41be008e67c9 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.cs @@ -3,50 +3,48 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Control plane and agent pool upgrade profiles. public partial class ManagedClusterUpgradeProfileProperties : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[] _agentPoolProfile; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[] _agentPoolProfile; /// The list of available upgrade versions for agent pools. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get => this._agentPoolProfile; set => this._agentPoolProfile = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get => this._agentPoolProfile; set => this._agentPoolProfile = value; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile _controlPlaneProfile; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile _controlPlaneProfile; /// The list of available upgrade versions for the control plane. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile ControlPlaneProfile { get => (this._controlPlaneProfile = this._controlPlaneProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfile()); set => this._controlPlaneProfile = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile ControlPlaneProfile { get => (this._controlPlaneProfile = this._controlPlaneProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfile()); set => this._controlPlaneProfile = value; } - /// Kubernetes version (major, minor, patch). + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string ControlPlaneProfileKubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).KubernetesVersion = value ; } + public string ControlPlaneProfileKubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).KubernetesVersion = value ; } - /// Pool name. + /// The Agent Pool name. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string ControlPlaneProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).Name = value ?? null; } + public string ControlPlaneProfileName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).Name = value ?? null; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType ControlPlaneProfileOSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).OSType = value ; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType ControlPlaneProfileOSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).OSType = value ; } /// List of orchestrator types and versions available for upgrade. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).Upgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).Upgrade = value ?? null /* arrayOf */; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).Upgrade; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileInternal)ControlPlaneProfile).Upgrade = value ?? null /* arrayOf */; } /// Internal Acessors for ControlPlaneProfile - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfilePropertiesInternal.ControlPlaneProfile { get => (this._controlPlaneProfile = this._controlPlaneProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfile()); set { {_controlPlaneProfile = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfilePropertiesInternal.ControlPlaneProfile { get => (this._controlPlaneProfile = this._controlPlaneProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfile()); set { {_controlPlaneProfile = value;} } } /// Creates an new instance. public ManagedClusterUpgradeProfileProperties() @@ -64,31 +62,29 @@ public partial interface IManagedClusterUpgradeProfileProperties : ReadOnly = false, Description = @"The list of available upgrade versions for agent pools.", SerializedName = @"agentPoolProfiles", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get; set; } - /// Kubernetes version (major, minor, patch). + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get; set; } + /// The Kubernetes version (major.minor.patch). [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Kubernetes version (major, minor, patch).", + Description = @"The Kubernetes version (major.minor.patch).", SerializedName = @"kubernetesVersion", PossibleTypes = new [] { typeof(string) })] string ControlPlaneProfileKubernetesVersion { get; set; } - /// Pool name. + /// The Agent Pool name. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"Pool name.", + Description = @"The Agent Pool name.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string ControlPlaneProfileName { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux.", + Description = @"The operating system type. The default is Linux.", SerializedName = @"osType", PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType ControlPlaneProfileOSType { get; set; } @@ -98,8 +94,8 @@ public partial interface IManagedClusterUpgradeProfileProperties : ReadOnly = false, Description = @"List of orchestrator types and versions available for upgrade.", SerializedName = @"upgrades", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get; set; } } /// Control plane and agent pool upgrade profiles. @@ -107,19 +103,17 @@ internal partial interface IManagedClusterUpgradeProfilePropertiesInternal { /// The list of available upgrade versions for agent pools. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile[] AgentPoolProfile { get; set; } /// The list of available upgrade versions for the control plane. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile ControlPlaneProfile { get; set; } - /// Kubernetes version (major, minor, patch). + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile ControlPlaneProfile { get; set; } + /// The Kubernetes version (major.minor.patch). string ControlPlaneProfileKubernetesVersion { get; set; } - /// Pool name. + /// The Agent Pool name. string ControlPlaneProfileName { get; set; } - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType ControlPlaneProfileOSType { get; set; } /// List of orchestrator types and versions available for upgrade. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfileUpgradesItem[] ControlPlaneProfileUpgrade { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.json.cs similarity index 93% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.json.cs index 70a3e0192c16..04efb713f432 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterUpgradeProfileProperties.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterUpgradeProfileProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ManagedClusterUpgradeProfileProperties 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.Api20200901.IManagedClusterUpgradeProfileProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfileProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfileProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterUpgradeProfileProperties(json) : null; } @@ -77,8 +77,8 @@ internal ManagedClusterUpgradeProfileProperties(Microsoft.Azure.PowerShell.Cmdle { return; } - {_controlPlaneProfile = If( json?.PropertyT("controlPlaneProfile"), out var __jsonControlPlaneProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfile.FromJson(__jsonControlPlaneProfile) : ControlPlaneProfile;} - {_agentPoolProfile = If( json?.PropertyT("agentPoolProfiles"), out var __jsonAgentPoolProfiles) ? If( __jsonAgentPoolProfiles as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPoolUpgradeProfile) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterPoolUpgradeProfile.FromJson(__u) )) ))() : null : AgentPoolProfile;} + {_controlPlaneProfile = If( json?.PropertyT("controlPlaneProfile"), out var __jsonControlPlaneProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfile.FromJson(__jsonControlPlaneProfile) : ControlPlaneProfile;} + {_agentPoolProfile = If( json?.PropertyT("agentPoolProfiles"), out var __jsonAgentPoolProfiles) ? If( __jsonAgentPoolProfiles as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterPoolUpgradeProfile) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterPoolUpgradeProfile.FromJson(__u) )) ))() : null : AgentPoolProfile;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.PowerShell.cs new file mode 100644 index 000000000000..a9955f221541 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.PowerShell.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Profile for Windows VMs in the managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterWindowsProfileTypeConverter))] + public partial class ManagedClusterWindowsProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterWindowsProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterWindowsProfile(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.Api20230201.IManagedClusterWindowsProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterWindowsProfile(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.Api20230201.IManagedClusterWindowsProfile 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 ManagedClusterWindowsProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GmsaProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile) content.GetValueForProperty("GmsaProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AdminUsername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).AdminUsername = (string) content.GetValueForProperty("AdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).AdminUsername, global::System.Convert.ToString); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).AdminPassword = (string) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).AdminPassword, global::System.Convert.ToString); + } + if (content.Contains("LicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); + } + if (content.Contains("EnableCsiProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).EnableCsiProxy = (bool?) content.GetValueForProperty("EnableCsiProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).EnableCsiProxy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GmsaProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileEnabled = (bool?) content.GetValueForProperty("GmsaProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GmsaProfileDnsServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileDnsServer = (string) content.GetValueForProperty("GmsaProfileDnsServer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileDnsServer, global::System.Convert.ToString); + } + if (content.Contains("GmsaProfileRootDomainName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileRootDomainName = (string) content.GetValueForProperty("GmsaProfileRootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileRootDomainName, 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 ManagedClusterWindowsProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("GmsaProfile")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfile = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile) content.GetValueForProperty("GmsaProfile",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfile, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfileTypeConverter.ConvertFrom); + } + if (content.Contains("AdminUsername")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).AdminUsername = (string) content.GetValueForProperty("AdminUsername",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).AdminUsername, global::System.Convert.ToString); + } + if (content.Contains("AdminPassword")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).AdminPassword = (string) content.GetValueForProperty("AdminPassword",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).AdminPassword, global::System.Convert.ToString); + } + if (content.Contains("LicenseType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).LicenseType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType?) content.GetValueForProperty("LicenseType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).LicenseType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType.CreateFrom); + } + if (content.Contains("EnableCsiProxy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).EnableCsiProxy = (bool?) content.GetValueForProperty("EnableCsiProxy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).EnableCsiProxy, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GmsaProfileEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileEnabled = (bool?) content.GetValueForProperty("GmsaProfileEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("GmsaProfileDnsServer")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileDnsServer = (string) content.GetValueForProperty("GmsaProfileDnsServer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileDnsServer, global::System.Convert.ToString); + } + if (content.Contains("GmsaProfileRootDomainName")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileRootDomainName = (string) content.GetValueForProperty("GmsaProfileRootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal)this).GmsaProfileRootDomainName, 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(); + } + /// Profile for Windows VMs in the managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterWindowsProfileTypeConverter))] + public partial interface IManagedClusterWindowsProfile + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.TypeConverter.cs index 857786fa7a88..cfc41a517c5c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.cs new file mode 100644 index 000000000000..005a51efbabd --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.cs @@ -0,0 +1,219 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Profile for Windows VMs in the managed cluster. + public partial class ManagedClusterWindowsProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal + { + + /// Backing field for property. + private string _adminPassword; + + /// + /// 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:** + /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string AdminPassword { get => this._adminPassword; set => this._adminPassword = value; } + + /// Backing field for property. + private string _adminUsername; + + /// + /// Specifies the name of the administrator account.

**Restriction:** Cannot end in "."

**Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string AdminUsername { get => this._adminUsername; set => this._adminUsername = value; } + + /// Backing field for property. + private bool? _enableCsiProxy; + + /// + /// 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; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile _gmsaProfile; + + /// The Windows gMSA Profile in the Managed Cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile GmsaProfile { get => (this._gmsaProfile = this._gmsaProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfile()); set => this._gmsaProfile = value; } + + /// + /// 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string GmsaProfileDnsServer { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)GmsaProfile).DnsServer; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)GmsaProfile).DnsServer = value ?? null; } + + /// 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.Api20230201.IWindowsGmsaProfileInternal)GmsaProfile).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)GmsaProfile).Enabled = value ?? default(bool); } + + /// + /// Specifies the root domain name 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string GmsaProfileRootDomainName { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)GmsaProfile).RootDomainName; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)GmsaProfile).RootDomainName = value ?? null; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? _licenseType; + + /// + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? LicenseType { get => this._licenseType; set => this._licenseType = value; } + + /// Internal Acessors for GmsaProfile + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfileInternal.GmsaProfile { get => (this._gmsaProfile = this._gmsaProfile ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfile()); set { {_gmsaProfile = value;} } } + + /// Creates an new instance. + public ManagedClusterWindowsProfile() + { + + } + } + /// Profile for Windows VMs in the managed cluster. + public partial interface IManagedClusterWindowsProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// 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:** + /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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:** ""abc@123"", ""P@$$w0rd"", ""P@ssw0rd"", ""P@ssword123"", ""Pa$$word"", ""pass@word1"", ""Password!"", ""Password1"", ""Password22"", ""iloveyou!""", + SerializedName = @"adminPassword", + PossibleTypes = new [] { typeof(string) })] + string AdminPassword { get; set; } + /// + /// Specifies the name of the administrator account.

**Restriction:** Cannot end in "."

**Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Specifies the name of the administrator account.

**Restriction:** Cannot end in "".""

**Disallowed values:** ""administrator"", ""admin"", ""user"", ""user1"", ""test"", ""user2"", ""test1"", ""user3"", ""admin1"", ""1"", ""123"", ""a"", ""actuser"", ""adm"", ""admin2"", ""aspnet"", ""backup"", ""console"", ""david"", ""guest"", ""john"", ""owner"", ""root"", ""server"", ""sql"", ""support"", ""support_388945a0"", ""sys"", ""test2"", ""test3"", ""user4"", ""user5"".

**Minimum-length:** 1 character

**Max-length:** 20 characters", + SerializedName = @"adminUsername", + 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). + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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; } + /// + /// 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"dnsServer", + PossibleTypes = new [] { typeof(string) })] + string GmsaProfileDnsServer { get; set; } + /// Specifies whether to enable Windows gMSA in the managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether to enable Windows gMSA in the managed cluster.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + 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 + /// vnet which is used to create the managed cluster. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the root domain name 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.", + SerializedName = @"rootDomainName", + PossibleTypes = new [] { typeof(string) })] + string GmsaProfileRootDomainName { get; set; } + /// + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) for more details.", + SerializedName = @"licenseType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? LicenseType { get; set; } + + } + /// Profile for Windows VMs in the managed cluster. + internal partial interface IManagedClusterWindowsProfileInternal + + { + /// + /// 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:** + /// "abc@123", "P@$$w0rd", "P@ssw0rd", "P@ssword123", "Pa$$word", "pass@word1", "Password!", "Password1", "Password22", "iloveyou!" + ///
+ string AdminPassword { get; set; } + /// + /// Specifies the name of the administrator account.

**Restriction:** Cannot end in "."

**Disallowed values:** + /// "administrator", "admin", "user", "user1", "test", "user2", "test1", "user3", "admin1", "1", "123", "a", "actuser", "adm", + /// "admin2", "aspnet", "backup", "console", "david", "guest", "john", "owner", "root", "server", "sql", "support", "support_388945a0", + /// "sys", "test2", "test3", "user4", "user5".

**Minimum-length:** 1 character

**Max-length:** 20 characters + ///
+ string AdminUsername { get; set; } + /// + /// 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. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile GmsaProfile { 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. + 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 + /// vnet which is used to create the managed cluster. + ///
+ string GmsaProfileRootDomainName { get; set; } + /// + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType? LicenseType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.json.cs similarity index 85% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.json.cs index d59d11b872d5..67381519fdf5 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterWindowsProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWindowsProfile.json.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Profile for Windows VMs in the container service cluster. + /// Profile for Windows VMs in the managed cluster. public partial class ManagedClusterWindowsProfile { @@ -54,13 +54,13 @@ public partial class ManagedClusterWindowsProfile 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.Api20200901.IManagedClusterWindowsProfile. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterWindowsProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWindowsProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterWindowsProfile(json) : null; } @@ -77,9 +77,11 @@ internal ManagedClusterWindowsProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Run { return; } + {_gmsaProfile = If( json?.PropertyT("gmsaProfile"), out var __jsonGmsaProfile) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.WindowsGmsaProfile.FromJson(__jsonGmsaProfile) : GmsaProfile;} {_adminUsername = If( json?.PropertyT("adminUsername"), out var __jsonAdminUsername) ? (string)__jsonAdminUsername : (string)AdminUsername;} {_adminPassword = If( json?.PropertyT("adminPassword"), out var __jsonAdminPassword) ? (string)__jsonAdminPassword : (string)AdminPassword;} {_licenseType = If( json?.PropertyT("licenseType"), out var __jsonLicenseType) ? (string)__jsonLicenseType : (string)LicenseType;} + {_enableCsiProxy = If( json?.PropertyT("enableCSIProxy"), out var __jsonEnableCsiProxy) ? (bool?)__jsonEnableCsiProxy : EnableCsiProxy;} AfterFromJson(json); } @@ -102,9 +104,11 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } + AddIf( null != this._gmsaProfile ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._gmsaProfile.ToJson(null,serializationMode) : null, "gmsaProfile" ,container.Add ); AddIf( null != (((object)this._adminUsername)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._adminUsername.ToString()) : null, "adminUsername" ,container.Add ); AddIf( null != (((object)this._adminPassword)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._adminPassword.ToString()) : null, "adminPassword" ,container.Add ); AddIf( null != (((object)this._licenseType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._licenseType.ToString()) : null, "licenseType" ,container.Add ); + AddIf( null != this._enableCsiProxy ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._enableCsiProxy) : null, "enableCSIProxy" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.PowerShell.cs new file mode 100644 index 000000000000..e488d94d5894 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.PowerShell.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Workload Auto-scaler profile for the managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterWorkloadAutoScalerProfileTypeConverter))] + public partial class ManagedClusterWorkloadAutoScalerProfile + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterWorkloadAutoScalerProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterWorkloadAutoScalerProfile(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.Api20230201.IManagedClusterWorkloadAutoScalerProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterWorkloadAutoScalerProfile(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.Api20230201.IManagedClusterWorkloadAutoScalerProfile 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 ManagedClusterWorkloadAutoScalerProfile(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Keda")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)this).Keda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("Keda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)this).Keda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); + } + if (content.Contains("KedaEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)this).KedaEnabled = (bool) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)this).KedaEnabled, (__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 ManagedClusterWorkloadAutoScalerProfile(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Keda")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)this).Keda = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda) content.GetValueForProperty("Keda",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)this).Keda, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter.ConvertFrom); + } + if (content.Contains("KedaEnabled")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)this).KedaEnabled = (bool) content.GetValueForProperty("KedaEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal)this).KedaEnabled, (__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(); + } + /// Workload Auto-scaler profile for the managed cluster. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterWorkloadAutoScalerProfileTypeConverter))] + public partial interface IManagedClusterWorkloadAutoScalerProfile + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.TypeConverter.cs new file mode 100644 index 000000000000..b39a0b9e5390 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterWorkloadAutoScalerProfileTypeConverter : 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.Api20230201.IManagedClusterWorkloadAutoScalerProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterWorkloadAutoScalerProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterWorkloadAutoScalerProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterWorkloadAutoScalerProfile.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.cs new file mode 100644 index 000000000000..2fdd42e6b0d0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.cs @@ -0,0 +1,64 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Workload Auto-scaler profile for the managed cluster. + public partial class ManagedClusterWorkloadAutoScalerProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda _keda; + + /// + /// KEDA (Kubernetes Event-driven Autoscaling) 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.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda Keda { get => (this._keda = this._keda ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKeda()); set => this._keda = value; } + + /// 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.Api20230201.IManagedClusterWorkloadAutoScalerProfileKedaInternal)Keda).Enabled; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKedaInternal)Keda).Enabled = value ?? default(bool); } + + /// Internal Acessors for Keda + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileInternal.Keda { get => (this._keda = this._keda ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKeda()); set { {_keda = value;} } } + + /// Creates an new instance. + public ManagedClusterWorkloadAutoScalerProfile() + { + + } + } + /// Workload Auto-scaler profile for the managed cluster. + public partial interface IManagedClusterWorkloadAutoScalerProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable KEDA. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Whether to enable KEDA.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool? KedaEnabled { get; set; } + + } + /// Workload Auto-scaler profile for the managed cluster. + internal partial interface IManagedClusterWorkloadAutoScalerProfileInternal + + { + /// + /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda Keda { get; set; } + /// Whether to enable KEDA. + bool? KedaEnabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.json.cs new file mode 100644 index 000000000000..983c9a458b8c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Workload Auto-scaler profile for the managed cluster. + public partial class ManagedClusterWorkloadAutoScalerProfile + { + + /// + /// 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.Api20230201.IManagedClusterWorkloadAutoScalerProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterWorkloadAutoScalerProfile(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 ManagedClusterWorkloadAutoScalerProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_keda = If( json?.PropertyT("keda"), out var __jsonKeda) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ManagedClusterWorkloadAutoScalerProfileKeda.FromJson(__jsonKeda) : Keda;} + 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._keda ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._keda.ToJson(null,serializationMode) : null, "keda" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.PowerShell.cs new file mode 100644 index 000000000000..53133289e812 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + /// + [System.ComponentModel.TypeConverter(typeof(ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter))] + public partial class ManagedClusterWorkloadAutoScalerProfileKeda + { + + /// + /// 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); + + /// + /// 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.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClusterWorkloadAutoScalerProfileKeda(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.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClusterWorkloadAutoScalerProfileKeda(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.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda 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 ManagedClusterWorkloadAutoScalerProfileKeda(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.Api20230201.IManagedClusterWorkloadAutoScalerProfileKedaInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKedaInternal)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 ManagedClusterWorkloadAutoScalerProfileKeda(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.Api20230201.IManagedClusterWorkloadAutoScalerProfileKedaInternal)this).Enabled = (bool) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKedaInternal)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(); + } + /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + [System.ComponentModel.TypeConverter(typeof(ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter))] + public partial interface IManagedClusterWorkloadAutoScalerProfileKeda + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.TypeConverter.cs new file mode 100644 index 000000000000..1f158afa8101 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class ManagedClusterWorkloadAutoScalerProfileKedaTypeConverter : 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.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClusterWorkloadAutoScalerProfileKeda.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClusterWorkloadAutoScalerProfileKeda.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClusterWorkloadAutoScalerProfileKeda.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.cs new file mode 100644 index 000000000000..a3a124867dd8 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + /// + public partial class ManagedClusterWorkloadAutoScalerProfileKeda : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKedaInternal + { + + /// Backing field for property. + private bool _enabled; + + /// Whether to enable KEDA. + [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 ManagedClusterWorkloadAutoScalerProfileKeda() + { + + } + } + /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + public partial interface IManagedClusterWorkloadAutoScalerProfileKeda : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Whether to enable KEDA. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Whether to enable KEDA.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + bool Enabled { get; set; } + + } + /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + internal partial interface IManagedClusterWorkloadAutoScalerProfileKedaInternal + + { + /// Whether to enable KEDA. + bool Enabled { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.json.cs similarity index 77% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.json.cs index 83d2552fafe5..9ebd1986c2bf 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceVMDiagnostics.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedClusterWorkloadAutoScalerProfileKeda.json.cs @@ -3,12 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Profile for diagnostics on the container service VMs. - public partial class ContainerServiceVMDiagnostics + /// + /// KEDA (Kubernetes Event-driven Autoscaling) settings for the workload auto-scaler profile. + /// + public partial class ManagedClusterWorkloadAutoScalerProfileKeda { /// @@ -54,10 +56,22 @@ public partial class ContainerServiceVMDiagnostics 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.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterWorkloadAutoScalerProfileKeda FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterWorkloadAutoScalerProfileKeda(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 ContainerServiceVMDiagnostics(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal ManagedClusterWorkloadAutoScalerProfileKeda(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -66,30 +80,19 @@ internal ContainerServiceVMDiagnostics(Microsoft.Azure.PowerShell.Cmdlets.Aks.Ru return; } {_enabled = If( json?.PropertyT("enabled"), out var __jsonEnabled) ? (bool)__jsonEnabled : Enabled;} - {_storageUri = If( json?.PropertyT("storageUri"), out var __jsonStorageUri) ? (string)__jsonStorageUri : (string)StorageUri;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceVMDiagnostics FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ContainerServiceVMDiagnostics(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) { @@ -102,10 +105,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro 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 ); - if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) - { - AddIf( null != (((object)this._storageUri)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._storageUri.ToString()) : null, "storageUri" ,container.Add ); - } AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.PowerShell.cs similarity index 80% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.PowerShell.cs index 822a626fa173..6e40e74891ee 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.PowerShell.cs @@ -3,12 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - [System.ComponentModel.TypeConverter(typeof(ManagedClusterIdentityUserAssignedIdentitiesValueTypeConverter))] - public partial class ManagedClusterIdentityUserAssignedIdentitiesValue + [System.ComponentModel.TypeConverter(typeof(ManagedServiceIdentityUserAssignedIdentitiesValueTypeConverter))] + public partial class ManagedServiceIdentityUserAssignedIdentitiesValue { /// @@ -54,49 +54,49 @@ public partial class ManagedClusterIdentityUserAssignedIdentitiesValue partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ManagedClusterIdentityUserAssignedIdentitiesValue(content); + return new ManagedServiceIdentityUserAssignedIdentitiesValue(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ManagedClusterIdentityUserAssignedIdentitiesValue(content); + return new ManagedServiceIdentityUserAssignedIdentitiesValue(content); } /// - /// Creates a new instance of , deserializing the 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. + /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue 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 ManagedClusterIdentityUserAssignedIdentitiesValue(global::System.Collections.IDictionary content) + internal ManagedServiceIdentityUserAssignedIdentitiesValue(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -107,21 +107,21 @@ internal ManagedClusterIdentityUserAssignedIdentitiesValue(global::System.Collec // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal)this).ClientId, 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 ManagedClusterIdentityUserAssignedIdentitiesValue(global::System.Management.Automation.PSObject content) + internal ManagedServiceIdentityUserAssignedIdentitiesValue(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -132,11 +132,11 @@ internal ManagedClusterIdentityUserAssignedIdentitiesValue(global::System.Manage // actually deserialize if (content.Contains("PrincipalId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal)this).PrincipalId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal)this).PrincipalId = (string) content.GetValueForProperty("PrincipalId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal)this).PrincipalId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal)this).ClientId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -146,8 +146,8 @@ internal ManagedClusterIdentityUserAssignedIdentitiesValue(global::System.Manage /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } - [System.ComponentModel.TypeConverter(typeof(ManagedClusterIdentityUserAssignedIdentitiesValueTypeConverter))] - public partial interface IManagedClusterIdentityUserAssignedIdentitiesValue + [System.ComponentModel.TypeConverter(typeof(ManagedServiceIdentityUserAssignedIdentitiesValueTypeConverter))] + public partial interface IManagedServiceIdentityUserAssignedIdentitiesValue { diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.TypeConverter.cs similarity index 87% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.TypeConverter.cs index 81136ba7b9a3..effd00d985e0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.TypeConverter.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; /// - /// A PowerShell PSTypeConverter to support converting to an instance of /// - public partial class ManagedClusterIdentityUserAssignedIdentitiesValueTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class ManagedServiceIdentityUserAssignedIdentitiesValueTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -27,13 +27,13 @@ public partial class ManagedClusterIdentityUserAssignedIdentitiesValueTypeConver 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, + /// true if the instance could be converted to a type, /// otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) @@ -97,35 +97,35 @@ 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 + /// 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 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 + /// an instance of , or null if there is no suitable /// conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue).IsAssignableFrom(type)) { return sourceValue; } try { - return ManagedClusterIdentityUserAssignedIdentitiesValue.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return ManagedServiceIdentityUserAssignedIdentitiesValue.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -133,11 +133,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ManagedClusterIdentityUserAssignedIdentitiesValue.DeserializeFromPSObject(sourceValue); + return ManagedServiceIdentityUserAssignedIdentitiesValue.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ManagedClusterIdentityUserAssignedIdentitiesValue.DeserializeFromDictionary(sourceValue); + return ManagedServiceIdentityUserAssignedIdentitiesValue.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.cs similarity index 78% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.cs index 6f37cb4e39b2..b43c72d6b218 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - public partial class ManagedClusterIdentityUserAssignedIdentitiesValue : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal + public partial class ManagedServiceIdentityUserAssignedIdentitiesValue : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal { /// Backing field for property. @@ -20,10 +20,10 @@ public partial class ManagedClusterIdentityUserAssignedIdentitiesValue : public string ClientId { get => this._clientId; } /// Internal Acessors for ClientId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal.ClientId { get => this._clientId; set { {_clientId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal.ClientId { get => this._clientId; set { {_clientId = value;} } } /// Internal Acessors for PrincipalId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValueInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValueInternal.PrincipalId { get => this._principalId; set { {_principalId = value;} } } /// Backing field for property. private string _principalId; @@ -33,14 +33,14 @@ public partial class ManagedClusterIdentityUserAssignedIdentitiesValue : public string PrincipalId { get => this._principalId; } /// - /// Creates an new instance. + /// Creates an new instance. /// - public ManagedClusterIdentityUserAssignedIdentitiesValue() + public ManagedServiceIdentityUserAssignedIdentitiesValue() { } } - public partial interface IManagedClusterIdentityUserAssignedIdentitiesValue : + public partial interface IManagedServiceIdentityUserAssignedIdentitiesValue : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { /// The client id of user assigned identity. @@ -61,7 +61,7 @@ public partial interface IManagedClusterIdentityUserAssignedIdentitiesValue : string PrincipalId { get; } } - internal partial interface IManagedClusterIdentityUserAssignedIdentitiesValueInternal + internal partial interface IManagedServiceIdentityUserAssignedIdentitiesValueInternal { /// The client id of user assigned identity. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.json.cs similarity index 90% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.json.cs index 45e0f62424e8..900e8c43d3d3 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterIdentityUserAssignedIdentitiesValue.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ManagedServiceIdentityUserAssignedIdentitiesValue.json.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - public partial class ManagedClusterIdentityUserAssignedIdentitiesValue + public partial class ManagedServiceIdentityUserAssignedIdentitiesValue { /// @@ -53,23 +53,23 @@ public partial class ManagedClusterIdentityUserAssignedIdentitiesValue 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.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterIdentityUserAssignedIdentitiesValue FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedServiceIdentityUserAssignedIdentitiesValue FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterIdentityUserAssignedIdentitiesValue(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedServiceIdentityUserAssignedIdentitiesValue(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 ManagedClusterIdentityUserAssignedIdentitiesValue(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal ManagedServiceIdentityUserAssignedIdentitiesValue(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -83,14 +83,14 @@ internal ManagedClusterIdentityUserAssignedIdentitiesValue(Microsoft.Azure.Power } /// - /// Serializes this instance of into a 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 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) diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.PowerShell.cs similarity index 53% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.PowerShell.cs index 7beb696196eb..b8d9fd3e17e5 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterAccessProfile.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.PowerShell.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Managed cluster Access Profile. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterAccessProfileTypeConverter))] - public partial class ManagedClusterAccessProfile + /// The OS option profile. + [System.ComponentModel.TypeConverter(typeof(OSOptionProfileTypeConverter))] + public partial class OSOptionProfile { /// @@ -55,44 +55,44 @@ public partial class ManagedClusterAccessProfile partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IManagedClusterAccessProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ManagedClusterAccessProfile(content); + return new OSOptionProfile(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.Api20200901.IManagedClusterAccessProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ManagedClusterAccessProfile(content); + return new OSOptionProfile(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.Api20200901.IManagedClusterAccessProfile 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.Api20230201.IOSOptionProfile 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 ManagedClusterAccessProfile(global::System.Collections.IDictionary content) + internal OSOptionProfile(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -103,41 +103,33 @@ internal ManagedClusterAccessProfile(global::System.Collections.IDictionary cont // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AccessProfileTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyList) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionPropertyListTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("Location")) + if (content.Contains("OSOptionPropertyList")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTagsTypeConverter.ConvertFrom); - } - if (content.Contains("KubeConfig")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfileInternal)this).KubeConfig = (byte[]) content.GetValueForProperty("KubeConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfileInternal)this).KubeConfig, i => i); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).OSOptionPropertyList = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[]) content.GetValueForProperty("OSOptionPropertyList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).OSOptionPropertyList, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionPropertyTypeConverter.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 ManagedClusterAccessProfile(global::System.Management.Automation.PSObject content) + internal OSOptionProfile(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -148,31 +140,23 @@ internal ManagedClusterAccessProfile(global::System.Management.Automation.PSObje // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAccessProfile) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.AccessProfileTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyList) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionPropertyListTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Type, global::System.Convert.ToString); - } - if (content.Contains("Location")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Location, global::System.Convert.ToString); - } - if (content.Contains("Tag")) - { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).Type, global::System.Convert.ToString); } - if (content.Contains("KubeConfig")) + if (content.Contains("OSOptionPropertyList")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfileInternal)this).KubeConfig = (byte[]) content.GetValueForProperty("KubeConfig",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterAccessProfileInternal)this).KubeConfig, i => i); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).OSOptionPropertyList = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[]) content.GetValueForProperty("OSOptionPropertyList",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal)this).OSOptionPropertyList, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionPropertyTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -182,9 +166,9 @@ internal ManagedClusterAccessProfile(global::System.Management.Automation.PSObje /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// Managed cluster Access Profile. - [System.ComponentModel.TypeConverter(typeof(ManagedClusterAccessProfileTypeConverter))] - public partial interface IManagedClusterAccessProfile + /// The OS option profile. + [System.ComponentModel.TypeConverter(typeof(OSOptionProfileTypeConverter))] + public partial interface IOSOptionProfile { diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.TypeConverter.cs new file mode 100644 index 000000000000..1739f36de055 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OSOptionProfileTypeConverter : 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.Api20230201.IOSOptionProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OSOptionProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OSOptionProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OSOptionProfile.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.cs new file mode 100644 index 000000000000..d1343178828c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The OS option profile. + public partial class OSOptionProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.Api20230201.IOSOptionProfileInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyList Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfileInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionPropertyList()); set { {_property = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[] OSOptionPropertyList { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyListInternal)Property).OSOptionPropertyList1; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyListInternal)Property).OSOptionPropertyList1 = value ; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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.Api20230201.IOSOptionPropertyList Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionPropertyList()); set => this._property = value; } + + /// 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, + 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, + 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, + Description = @"The list of OS options.", + SerializedName = @"osOptionPropertyList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[] OSOptionPropertyList { get; set; } + /// The type of the OS option resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + 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. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[] OSOptionPropertyList { get; set; } + /// The list of OS options. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyList Property { get; set; } + /// The type of the OS option resource. + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.json.cs new file mode 100644 index 000000000000..e277652d6306 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProfile.json.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The OS option profile. + public partial class OSOptionProfile + { + + /// + /// 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.Api20230201.IOSOptionProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal OSOptionProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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;} + 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._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.IncludeReadOnly)) + { + 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.IncludeReadOnly)) + { + 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.IncludeReadOnly)) + { + 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 ); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.PowerShell.cs new file mode 100644 index 000000000000..9dc40f52ee69 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// OS option property. + [System.ComponentModel.TypeConverter(typeof(OSOptionPropertyTypeConverter))] + public partial class OSOptionProperty + { + + /// + /// 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); + + /// + /// 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.Api20230201.IOSOptionProperty DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OSOptionProperty(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.Api20230201.IOSOptionProperty DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OSOptionProperty(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.Api20230201.IOSOptionProperty 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 OSOptionProperty(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyInternal)this).OSType = (string) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyInternal)this).OSType, global::System.Convert.ToString); + } + if (content.Contains("EnableFipsImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyInternal)this).EnableFipsImage = (bool) content.GetValueForProperty("EnableFipsImage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyInternal)this).EnableFipsImage, (__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 OSOptionProperty(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyInternal)this).OSType = (string) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyInternal)this).OSType, global::System.Convert.ToString); + } + if (content.Contains("EnableFipsImage")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyInternal)this).EnableFipsImage = (bool) content.GetValueForProperty("EnableFipsImage",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyInternal)this).EnableFipsImage, (__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(); + } + /// OS option property. + [System.ComponentModel.TypeConverter(typeof(OSOptionPropertyTypeConverter))] + public partial interface IOSOptionProperty + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.TypeConverter.cs new file mode 100644 index 000000000000..83b3d9db1e4b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OSOptionPropertyTypeConverter : 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.Api20230201.IOSOptionProperty ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OSOptionProperty.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OSOptionProperty.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OSOptionProperty.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.cs new file mode 100644 index 000000000000..514309a6be83 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// OS option property. + public partial class OSOptionProperty : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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, + 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, + 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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.json.cs new file mode 100644 index 000000000000..49953c7a171c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionProperty.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// OS option property. + public partial class OSOptionProperty + { + + /// + /// 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.Api20230201.IOSOptionProperty. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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 . + /// + /// A Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject instance to deserialize from. + internal OSOptionProperty(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + 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;} + 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._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 ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.PowerShell.cs new file mode 100644 index 000000000000..f3dec3180c33 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.PowerShell.cs @@ -0,0 +1,144 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The list of OS option properties. + [System.ComponentModel.TypeConverter(typeof(OSOptionPropertyListTypeConverter))] + public partial class OSOptionPropertyList + { + + /// + /// 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); + + /// + /// 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.Api20230201.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.Api20230201.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.Api20230201.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) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OSOptionPropertyList1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyListInternal)this).OSOptionPropertyList1 = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[]) content.GetValueForProperty("OSOptionPropertyList1",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyListInternal)this).OSOptionPropertyList1, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionPropertyTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OSOptionPropertyList(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("OSOptionPropertyList1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyListInternal)this).OSOptionPropertyList1 = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[]) content.GetValueForProperty("OSOptionPropertyList1",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyListInternal)this).OSOptionPropertyList1, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionPropertyTypeConverter.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(); + } + /// The list of OS option properties. + [System.ComponentModel.TypeConverter(typeof(OSOptionPropertyListTypeConverter))] + public partial interface IOSOptionPropertyList + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.TypeConverter.cs new file mode 100644 index 000000000000..55424ac55153 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OSOptionPropertyListTypeConverter : 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.Api20230201.IOSOptionPropertyList ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyList).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OSOptionPropertyList.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OSOptionPropertyList.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OSOptionPropertyList.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.cs new file mode 100644 index 000000000000..bcef0b7a6572 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.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.Api20230201 +{ + 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.Api20230201.IOSOptionPropertyList, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyListInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[] _oSOptionPropertyList1; + + /// The list of OS options. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[] 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, + Description = @"The list of OS options.", + SerializedName = @"osOptionPropertyList", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[] OSOptionPropertyList1 { get; set; } + + } + /// The list of OS option properties. + internal partial interface IOSOptionPropertyListInternal + + { + /// The list of OS options. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty[] OSOptionPropertyList1 { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.json.cs new file mode 100644 index 000000000000..357357a1448d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OSOptionPropertyList.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The list of OS option properties. + public partial class OSOptionPropertyList + { + + /// + /// 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.Api20230201.IOSOptionPropertyList. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyList. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionPropertyList 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; + } + + /// + /// 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) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + 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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProperty) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OSOptionProperty.FromJson(__u) )) ))() : null : OSOptionPropertyList1;} + 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._oSOptionPropertyList1) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._oSOptionPropertyList1 ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("osOptionPropertyList",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.PowerShell.cs similarity index 84% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.PowerShell.cs index 012be278738d..d72d8dbb3409 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.PowerShell.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// The List Compute Operation operation response. + /// The List Operation response. [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] public partial class OperationListResult { @@ -55,27 +55,27 @@ public partial class OperationListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationListResult(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.Api20200901.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationListResult(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperati /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult 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. @@ -103,13 +103,13 @@ internal OperationListResult(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValueTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValueTypeConverter.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. @@ -124,7 +124,7 @@ internal OperationListResult(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValueTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValueTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } @@ -134,7 +134,7 @@ internal OperationListResult(global::System.Management.Automation.PSObject conte /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// The List Compute Operation operation response. + /// The List Operation response. [System.ComponentModel.TypeConverter(typeof(OperationListResultTypeConverter))] public partial interface IOperationListResult diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.TypeConverter.cs index 05874de95ffb..99ed9598c6c7 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.cs similarity index 61% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.cs index 271238ed3b68..537492408612 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.cs @@ -3,25 +3,25 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// The List Compute Operation operation response. + /// The List Operation response. public partial class OperationListResult : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResult, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResultInternal { /// Internal Acessors for Value - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue[] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue[] Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResultInternal.Value { get => this._value; set { {_value = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue[] _value; - /// The list of compute operations + /// The list of operations [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue[] Value { get => this._value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue[] Value { get => this._value; } /// Creates an new instance. public OperationListResult() @@ -29,26 +29,26 @@ public OperationListResult() } } - /// The List Compute Operation operation response. + /// The List Operation response. public partial interface IOperationListResult : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// The list of compute operations + /// The list of operations [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"The list of compute operations", + Description = @"The list of operations", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue[] Value { get; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue[] Value { get; } } - /// The List Compute Operation operation response. + /// The List Operation response. internal partial interface IOperationListResultInternal { - /// The list of compute operations - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue[] Value { get; set; } + /// The list of operations + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue[] Value { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.json.cs similarity index 93% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.json.cs index 5cffc28ce664..6c644dfdb3e9 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationListResult.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationListResult.json.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// The List Compute Operation operation response. + /// The List Operation response. public partial class OperationListResult { @@ -54,13 +54,13 @@ public partial class OperationListResult 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.Api20200901.IOperationListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new OperationListResult(json) : null; } @@ -77,7 +77,7 @@ internal OperationListResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json { 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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValue.FromJson(__u) )) ))() : null : Value;} + {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValue.FromJson(__u) )) ))() : null : Value;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.PowerShell.cs similarity index 78% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.PowerShell.cs index 31581a3a913f..b78761ddfe56 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.PowerShell.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Describes the properties of a Compute Operation value. + /// Describes the properties of a Operation value. [System.ComponentModel.TypeConverter(typeof(OperationValueTypeConverter))] public partial class OperationValue { @@ -55,27 +55,27 @@ public partial class OperationValue partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IOperationValue DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationValue(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.Api20200901.IOperationValue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationValue(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperati /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue 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. @@ -103,37 +103,37 @@ internal OperationValue(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValueDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValueDisplayTypeConverter.ConvertFrom); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Origin, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayDescription, global::System.Convert.ToString); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayProvider, 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. @@ -148,31 +148,31 @@ internal OperationValue(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Display")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValueDisplayTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Display = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay) content.GetValueForProperty("Display",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Display, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValueDisplayTypeConverter.ConvertFrom); } if (content.Contains("Origin")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Origin, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Origin = (string) content.GetValueForProperty("Origin",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Origin, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("DisplayOperation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayOperation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayOperation = (string) content.GetValueForProperty("DisplayOperation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayOperation, global::System.Convert.ToString); } if (content.Contains("DisplayResource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayResource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayResource = (string) content.GetValueForProperty("DisplayResource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayResource, global::System.Convert.ToString); } if (content.Contains("DisplayDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayDescription = (string) content.GetValueForProperty("DisplayDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayDescription, global::System.Convert.ToString); } if (content.Contains("DisplayProvider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal)this).DisplayProvider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayProvider = (string) content.GetValueForProperty("DisplayProvider",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal)this).DisplayProvider, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -182,7 +182,7 @@ internal OperationValue(global::System.Management.Automation.PSObject content) /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// Describes the properties of a Compute Operation value. + /// Describes the properties of a Operation value. [System.ComponentModel.TypeConverter(typeof(OperationValueTypeConverter))] public partial interface IOperationValue diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.TypeConverter.cs index 2feaa1b5fe2c..6acb74617bbe 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.cs similarity index 69% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.cs index 6caeaf11f27f..4d679f0cfdb2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.cs @@ -3,71 +3,71 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Describes the properties of a Compute Operation value. + /// Describes the properties of a Operation value. public partial class OperationValue : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay _display; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay _display; - /// Describes the properties of a Compute Operation Value Display. + /// Describes the properties of a Operation Value Display. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValueDisplay()); set => this._display = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValueDisplay()); set => this._display = value; } /// The description of the operation. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Description; } + public string DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Description; } - /// The display name of the compute operation. + /// The display name of the operation. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Operation; } + public string DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Operation; } /// The resource provider for the operation. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Provider; } + public string DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Provider; } /// The display name of the resource the operation applies to. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Resource; } + public string DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Resource; } /// Internal Acessors for Display - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValueDisplay()); set { {_display = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal.Display { get => (this._display = this._display ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValueDisplay()); set { {_display = value;} } } /// Internal Acessors for DisplayDescription - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Description = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal.DisplayDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Description = value; } /// Internal Acessors for DisplayOperation - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Operation = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal.DisplayOperation { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Operation; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Operation = value; } /// Internal Acessors for DisplayProvider - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Provider = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal.DisplayProvider { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Provider; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Provider = value; } /// Internal Acessors for DisplayResource - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)Display).Resource = value; } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal.DisplayResource { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Resource; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)Display).Resource = value; } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Origin - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueInternal.Origin { get => this._origin; set { {_origin = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueInternal.Origin { get => this._origin; set { {_origin = value;} } } /// Backing field for property. private string _name; - /// The name of the compute operation. + /// The name of the operation. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Name { get => this._name; } /// Backing field for property. private string _origin; - /// The origin of the compute operation. + /// The origin of the operation. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Origin { get => this._origin; } @@ -77,7 +77,7 @@ public OperationValue() } } - /// Describes the properties of a Compute Operation value. + /// Describes the properties of a Operation value. public partial interface IOperationValue : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { @@ -89,11 +89,11 @@ public partial interface IOperationValue : SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] string DisplayDescription { get; } - /// The display name of the compute operation. + /// The display name of the operation. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"The display name of the compute operation.", + Description = @"The display name of the operation.", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] string DisplayOperation { get; } @@ -113,41 +113,41 @@ public partial interface IOperationValue : SerializedName = @"resource", PossibleTypes = new [] { typeof(string) })] string DisplayResource { get; } - /// The name of the compute operation. + /// The name of the operation. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"The name of the compute operation.", + Description = @"The name of the operation.", SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; } - /// The origin of the compute operation. + /// The origin of the operation. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"The origin of the compute operation.", + Description = @"The origin of the operation.", SerializedName = @"origin", PossibleTypes = new [] { typeof(string) })] string Origin { get; } } - /// Describes the properties of a Compute Operation value. + /// Describes the properties of a Operation value. internal partial interface IOperationValueInternal { - /// Describes the properties of a Compute Operation Value Display. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay Display { get; set; } + /// Describes the properties of a Operation Value Display. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay Display { get; set; } /// The description of the operation. string DisplayDescription { get; set; } - /// The display name of the compute operation. + /// The display name of the operation. string DisplayOperation { get; set; } /// The resource provider for the operation. string DisplayProvider { get; set; } /// The display name of the resource the operation applies to. string DisplayResource { get; set; } - /// The name of the compute operation. + /// The name of the operation. string Name { get; set; } - /// The origin of the compute operation. + /// The origin of the operation. string Origin { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.json.cs index 89e6f8241ce8..d108a0335e26 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValue.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValue.json.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Describes the properties of a Compute Operation value. + /// Describes the properties of a Operation value. public partial class OperationValue { @@ -54,13 +54,13 @@ public partial class OperationValue 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.Api20200901.IOperationValue. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new OperationValue(json) : null; } @@ -77,7 +77,7 @@ internal OperationValue(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.Json { return; } - {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.OperationValueDisplay.FromJson(__jsonDisplay) : Display;} + {_display = If( json?.PropertyT("display"), out var __jsonDisplay) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OperationValueDisplay.FromJson(__jsonDisplay) : Display;} {_origin = If( json?.PropertyT("origin"), out var __jsonOrigin) ? (string)__jsonOrigin : (string)Origin;} {_name = If( json?.PropertyT("name"), out var __jsonName) ? (string)__jsonName : (string)Name;} AfterFromJson(json); diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.PowerShell.cs similarity index 83% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.PowerShell.cs index 890abe6b4737..d667b784da6b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.PowerShell.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Describes the properties of a Compute Operation Value Display. + /// Describes the properties of a Operation Value Display. [System.ComponentModel.TypeConverter(typeof(OperationValueDisplayTypeConverter))] public partial class OperationValueDisplay { @@ -55,27 +55,27 @@ public partial class OperationValueDisplay partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IOperationValueDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new OperationValueDisplay(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.Api20200901.IOperationValueDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new OperationValueDisplay(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperati /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay 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. @@ -103,25 +103,25 @@ internal OperationValueDisplay(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Provider, 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. @@ -136,19 +136,19 @@ internal OperationValueDisplay(global::System.Management.Automation.PSObject con // actually deserialize if (content.Contains("Operation")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Operation, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Operation = (string) content.GetValueForProperty("Operation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Operation, global::System.Convert.ToString); } if (content.Contains("Resource")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Resource, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Resource = (string) content.GetValueForProperty("Resource",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Resource, global::System.Convert.ToString); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Description, global::System.Convert.ToString); } if (content.Contains("Provider")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal)this).Provider, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal)this).Provider, global::System.Convert.ToString); } AfterDeserializePSObject(content); } @@ -158,7 +158,7 @@ internal OperationValueDisplay(global::System.Management.Automation.PSObject con /// a containing this model serialized to JSON text. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); } - /// Describes the properties of a Compute Operation Value Display. + /// Describes the properties of a Operation Value Display. [System.ComponentModel.TypeConverter(typeof(OperationValueDisplayTypeConverter))] public partial interface IOperationValueDisplay diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.TypeConverter.cs index a558535cb927..f3c519be7493 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.cs similarity index 82% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.cs index 352429a70a8d..1c3bfadce61b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Describes the properties of a Compute Operation Value Display. + /// Describes the properties of a Operation Value Display. public partial class OperationValueDisplay : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal { /// Backing field for property. @@ -21,21 +21,21 @@ public partial class OperationValueDisplay : public string Description { get => this._description; } /// Internal Acessors for Description - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal.Description { get => this._description; set { {_description = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal.Description { get => this._description; set { {_description = value;} } } /// Internal Acessors for Operation - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal.Operation { get => this._operation; set { {_operation = value;} } } /// Internal Acessors for Provider - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal.Provider { get => this._provider; set { {_provider = value;} } } /// Internal Acessors for Resource - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplayInternal.Resource { get => this._resource; set { {_resource = value;} } } /// Backing field for property. private string _operation; - /// The display name of the compute operation. + /// The display name of the operation. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Operation { get => this._operation; } @@ -59,7 +59,7 @@ public OperationValueDisplay() } } - /// Describes the properties of a Compute Operation Value Display. + /// Describes the properties of a Operation Value Display. public partial interface IOperationValueDisplay : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { @@ -71,11 +71,11 @@ public partial interface IOperationValueDisplay : SerializedName = @"description", PossibleTypes = new [] { typeof(string) })] string Description { get; } - /// The display name of the compute operation. + /// The display name of the operation. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = true, - Description = @"The display name of the compute operation.", + Description = @"The display name of the operation.", SerializedName = @"operation", PossibleTypes = new [] { typeof(string) })] string Operation { get; } @@ -97,13 +97,13 @@ public partial interface IOperationValueDisplay : string Resource { get; } } - /// Describes the properties of a Compute Operation Value Display. + /// Describes the properties of a Operation Value Display. internal partial interface IOperationValueDisplayInternal { /// The description of the operation. string Description { get; set; } - /// The display name of the compute operation. + /// The display name of the operation. string Operation { get; set; } /// The resource provider for the operation. string Provider { get; set; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.json.cs index 95f96c050546..f66a06df384a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/OperationValueDisplay.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OperationValueDisplay.json.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Describes the properties of a Compute Operation Value Display. + /// Describes the properties of a Operation Value Display. public partial class OperationValueDisplay { @@ -54,13 +54,13 @@ public partial class OperationValueDisplay 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.Api20200901.IOperationValueDisplay. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValueDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValueDisplay FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new OperationValueDisplay(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.PowerShell.cs new file mode 100644 index 000000000000..eddaaa1f8a53 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Egress endpoints which AKS agent nodes connect to for common purpose. + [System.ComponentModel.TypeConverter(typeof(OutboundEnvironmentEndpointTypeConverter))] + public partial class OutboundEnvironmentEndpoint + { + + /// + /// 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); + + /// + /// 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.Api20230201.IOutboundEnvironmentEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OutboundEnvironmentEndpoint(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.Api20230201.IOutboundEnvironmentEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OutboundEnvironmentEndpoint(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.Api20230201.IOutboundEnvironmentEndpoint 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 OutboundEnvironmentEndpoint(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Category")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointInternal)this).Category, global::System.Convert.ToString); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency[]) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointInternal)this).Endpoint, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.EndpointDependencyTypeConverter.ConvertFrom)); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal OutboundEnvironmentEndpoint(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Category")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointInternal)this).Category = (string) content.GetValueForProperty("Category",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointInternal)this).Category, global::System.Convert.ToString); + } + if (content.Contains("Endpoint")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointInternal)this).Endpoint = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency[]) content.GetValueForProperty("Endpoint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointInternal)this).Endpoint, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.EndpointDependencyTypeConverter.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(); + } + /// Egress endpoints which AKS agent nodes connect to for common purpose. + [System.ComponentModel.TypeConverter(typeof(OutboundEnvironmentEndpointTypeConverter))] + public partial interface IOutboundEnvironmentEndpoint + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.TypeConverter.cs new file mode 100644 index 000000000000..6dfdad053a3e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OutboundEnvironmentEndpointTypeConverter : 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.Api20230201.IOutboundEnvironmentEndpoint ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OutboundEnvironmentEndpoint.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OutboundEnvironmentEndpoint.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OutboundEnvironmentEndpoint.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.cs new file mode 100644 index 000000000000..6736fcb3a29e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Egress endpoints which AKS agent nodes connect to for common purpose. + public partial class OutboundEnvironmentEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointInternal + { + + /// Backing field for property. + private string _category; + + /// + /// The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Category { get => this._category; set => this._category = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency[] _endpoint; + + /// The endpoints that AKS agent nodes connect to + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency[] Endpoint { get => this._endpoint; set => this._endpoint = value; } + + /// Creates an new instance. + public OutboundEnvironmentEndpoint() + { + + } + } + /// Egress endpoints which AKS agent nodes connect to for common purpose. + public partial interface IOutboundEnvironmentEndpoint : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc.", + SerializedName = @"category", + PossibleTypes = new [] { typeof(string) })] + string Category { get; set; } + /// The endpoints that AKS agent nodes connect to + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The endpoints that AKS agent nodes connect to", + SerializedName = @"endpoints", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency[] Endpoint { get; set; } + + } + /// Egress endpoints which AKS agent nodes connect to for common purpose. + internal partial interface IOutboundEnvironmentEndpointInternal + + { + /// + /// The category of endpoints accessed by the AKS agent node, e.g. azure-resource-management, apiserver, etc. + /// + string Category { get; set; } + /// The endpoints that AKS agent nodes connect to + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency[] Endpoint { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.json.cs new file mode 100644 index 000000000000..69077211ea12 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpoint.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Egress endpoints which AKS agent nodes connect to for common purpose. + public partial class OutboundEnvironmentEndpoint + { + + /// + /// 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.Api20230201.IOutboundEnvironmentEndpoint. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new OutboundEnvironmentEndpoint(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 OutboundEnvironmentEndpoint(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_category = If( json?.PropertyT("category"), out var __jsonCategory) ? (string)__jsonCategory : (string)Category;} + {_endpoint = If( json?.PropertyT("endpoints"), out var __jsonEndpoints) ? If( __jsonEndpoints as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IEndpointDependency) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.EndpointDependency.FromJson(__u) )) ))() : null : Endpoint;} + 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._category)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._category.ToString()) : null, "category" ,container.Add ); + if (null != this._endpoint) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._endpoint ) + { + AddIf(__x?.ToJson(null, serializationMode) ,__w.Add); + } + container.Add("endpoints",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.PowerShell.cs new file mode 100644 index 000000000000..e2c0972409cb --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.PowerShell.cs @@ -0,0 +1,157 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Collection of OutboundEnvironmentEndpoint + [System.ComponentModel.TypeConverter(typeof(OutboundEnvironmentEndpointCollectionTypeConverter))] + public partial class OutboundEnvironmentEndpointCollection + { + + /// + /// 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); + + /// + /// 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.Api20230201.IOutboundEnvironmentEndpointCollection DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new OutboundEnvironmentEndpointCollection(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.Api20230201.IOutboundEnvironmentEndpointCollection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new OutboundEnvironmentEndpointCollection(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.Api20230201.IOutboundEnvironmentEndpointCollection 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 OutboundEnvironmentEndpointCollection(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.Api20230201.IOutboundEnvironmentEndpointCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OutboundEnvironmentEndpointTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollectionInternal)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 OutboundEnvironmentEndpointCollection(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.Api20230201.IOutboundEnvironmentEndpointCollectionInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollectionInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OutboundEnvironmentEndpointTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollectionInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollectionInternal)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(); + } + /// Collection of OutboundEnvironmentEndpoint + [System.ComponentModel.TypeConverter(typeof(OutboundEnvironmentEndpointCollectionTypeConverter))] + public partial interface IOutboundEnvironmentEndpointCollection + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.TypeConverter.cs new file mode 100644 index 000000000000..4d9bdc8afdfc --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class OutboundEnvironmentEndpointCollectionTypeConverter : 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.Api20230201.IOutboundEnvironmentEndpointCollection ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollection).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return OutboundEnvironmentEndpointCollection.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return OutboundEnvironmentEndpointCollection.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return OutboundEnvironmentEndpointCollection.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.cs new file mode 100644 index 000000000000..f9863a44dd2e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Collection of OutboundEnvironmentEndpoint + public partial class OutboundEnvironmentEndpointCollection : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollection, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollectionInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollectionInternal.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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint[] _value; + + /// Collection of resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public OutboundEnvironmentEndpointCollection() + { + + } + } + /// Collection of OutboundEnvironmentEndpoint + public partial interface IOutboundEnvironmentEndpointCollection : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Link to next page of resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Link to next page of resources.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// Collection of resources. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Collection of resources.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint[] Value { get; set; } + + } + /// Collection of OutboundEnvironmentEndpoint + internal partial interface IOutboundEnvironmentEndpointCollectionInternal + + { + /// Link to next page of resources. + string NextLink { get; set; } + /// Collection of resources. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.json.cs new file mode 100644 index 000000000000..7f0e0daada60 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/OutboundEnvironmentEndpointCollection.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Collection of OutboundEnvironmentEndpoint + public partial class OutboundEnvironmentEndpointCollection + { + + /// + /// 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.Api20230201.IOutboundEnvironmentEndpointCollection. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollection. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpointCollection FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new OutboundEnvironmentEndpointCollection(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 OutboundEnvironmentEndpointCollection(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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.OutboundEnvironmentEndpoint.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.IncludeReadOnly)) + { + 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/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.PowerShell.cs similarity index 89% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.PowerShell.cs index 901950df17cf..760d156801d5 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PowerState partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IPowerState DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PowerState(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.Api20200901.IPowerState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PowerState(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerSt /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState 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. @@ -103,13 +103,13 @@ internal PowerState(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerStateInternal)this).Code = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerStateInternal)this).Code, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerStateInternal)this).Code = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerStateInternal)this).Code, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); } 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. @@ -124,7 +124,7 @@ internal PowerState(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Code")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerStateInternal)this).Code = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerStateInternal)this).Code, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerStateInternal)this).Code = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code?) content.GetValueForProperty("Code",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerStateInternal)this).Code, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.TypeConverter.cs index dd5265467ac1..015be14eb2b3 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.cs similarity index 91% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.cs index 9104bf2dd5a7..94f056f636c2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Describes the Power State of the cluster public partial class PowerState : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerStateInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerStateInternal { /// Backing field for property. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.json.cs index 54ff342edcf3..2ea360a12127 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PowerState.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PowerState.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PowerState 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.Api20200901.IPowerState. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPowerState FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPowerState FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new PowerState(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.PowerShell.cs similarity index 89% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.PowerShell.cs index 428aa7e3cbc4..676ab862efd7 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PrivateEndpoint partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IPrivateEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpoint(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.Api20200901.IPrivateEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpoint(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivate /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint 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. @@ -103,13 +103,13 @@ internal PrivateEndpoint(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointInternal)this).Id, 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. @@ -124,7 +124,7 @@ internal PrivateEndpoint(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointInternal)this).Id, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.TypeConverter.cs index d2a5c7ee36cf..f9f4bf580455 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.cs similarity index 76% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.cs index 757fb0ff7d90..d5303de8f145 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.cs @@ -3,20 +3,20 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Private endpoint which a connection belongs to. public partial class PrivateEndpoint : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointInternal { /// Backing field for property. private string _id; - /// The resource Id for private endpoint + /// The resource ID of the private endpoint [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Id { get => this._id; set => this._id = value; } @@ -30,11 +30,11 @@ public PrivateEndpoint() public partial interface IPrivateEndpoint : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// The resource Id for private endpoint + /// The resource ID of the private endpoint [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The resource Id for private endpoint", + Description = @"The resource ID of the private endpoint", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string Id { get; set; } @@ -44,7 +44,7 @@ public partial interface IPrivateEndpoint : internal partial interface IPrivateEndpointInternal { - /// The resource Id for private endpoint + /// The resource ID of the private endpoint string Id { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.json.cs index e890079352eb..9c0aea303f24 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpoint.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpoint.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpoint 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.Api20200901.IPrivateEndpoint. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new PrivateEndpoint(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.PowerShell.cs similarity index 77% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.PowerShell.cs index 5c9c548fd24a..b221c7b33217 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PrivateEndpointConnection partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IPrivateEndpointConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpointConnection(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.Api20200901.IPrivateEndpointConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpointConnection(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivate ///
/// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection 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. @@ -103,49 +103,49 @@ internal PrivateEndpointConnection(global::System.Collections.IDictionary conten // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("PrivateEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointTypeConverter.ConvertFrom); } if (content.Contains("PrivateLinkServiceConnectionState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); } if (content.Contains("PrivateEndpointId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); } 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. @@ -160,43 +160,43 @@ internal PrivateEndpointConnection(global::System.Management.Automation.PSObject // actually deserialize if (content.Contains("Property")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnectionPropertiesTypeConverter.ConvertFrom); } if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("PrivateEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointTypeConverter.ConvertFrom); } if (content.Contains("PrivateLinkServiceConnectionState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); } if (content.Contains("PrivateEndpointId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateEndpointId, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.TypeConverter.cs index 17d830774e60..58e1b00033c1 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.cs similarity index 80% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.cs index f0bdc172afb0..c047401cbbd6 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// A private endpoint connection public partial class PrivateEndpointConnection : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal { /// Backing field for property. @@ -21,25 +21,25 @@ public partial class PrivateEndpointConnection : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for PrivateEndpoint - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal.PrivateEndpoint { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpoint = value; } /// Internal Acessors for PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal.PrivateLinkServiceConnectionState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionState = value; } /// Internal Acessors for Property - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnectionProperties()); set { {_property = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnectionProperties()); set { {_property = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState = value; } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; @@ -48,28 +48,28 @@ public partial class PrivateEndpointConnection : [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string Name { get => this._name; } - /// The resource Id for private endpoint + /// The resource ID of the private endpoint [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value ?? null; } + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateEndpointId = value ?? null; } /// The private link service connection description. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; } + public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateDescription = value ?? null; } /// The private link service connection status. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).PrivateLinkServiceConnectionStateStatus = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus)""); } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties _property; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties _property; /// The properties of a private endpoint connection. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnectionProperties()); set => this._property = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnectionProperties()); set => this._property = value; } /// The current provisioning state. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)Property).ProvisioningState; } /// Backing field for property. private string _type; @@ -104,11 +104,11 @@ public partial interface IPrivateEndpointConnection : SerializedName = @"name", PossibleTypes = new [] { typeof(string) })] string Name { get; } - /// The resource Id for private endpoint + /// The resource ID of the private endpoint [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The resource Id for private endpoint", + Description = @"The resource ID of the private endpoint", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string PrivateEndpointId { get; set; } @@ -155,19 +155,19 @@ internal partial interface IPrivateEndpointConnectionInternal /// The name of the private endpoint connection. string Name { get; set; } /// The resource of private endpoint. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint PrivateEndpoint { get; set; } - /// The resource Id for private endpoint + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint PrivateEndpoint { get; set; } + /// The resource ID of the private endpoint string PrivateEndpointId { get; set; } /// /// A collection of information about the state of the connection between service consumer and provider. /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } /// The private link service connection description. string PrivateLinkServiceConnectionStateDescription { get; set; } /// The private link service connection status. Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus? PrivateLinkServiceConnectionStateStatus { get; set; } /// The properties of a private endpoint connection. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties Property { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties Property { get; set; } /// The current provisioning state. Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState? ProvisioningState { get; set; } /// The resource type. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.json.cs index a901d6880285..c9bd3e9e272a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnection.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnection.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnection 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.Api20200901.IPrivateEndpointConnection. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new PrivateEndpointConnection(json) : null; } @@ -77,7 +77,7 @@ internal PrivateEndpointConnection(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtim { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnectionProperties.FromJson(__jsonProperties) : Property;} + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnectionProperties.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;} diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.PowerShell.cs similarity index 86% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.PowerShell.cs index 9463cd951b5c..b47f04947b65 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PrivateEndpointConnectionListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpointConnectionListResult(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpointConnectionListResult(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivate /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResult 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. @@ -107,13 +107,13 @@ internal PrivateEndpointConnectionListResult(global::System.Collections.IDiction // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnectionTypeConverter.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. @@ -128,7 +128,7 @@ internal PrivateEndpointConnectionListResult(global::System.Management.Automatio // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnectionTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnectionTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.TypeConverter.cs index c52256c1c379..6c4bdf3d8c90 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.cs similarity index 80% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.cs index f57e5d721248..03f290d696f0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// A list of private endpoint connections public partial class PrivateEndpointConnectionListResult : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResult, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResultInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection[] _value; /// The collection value. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PrivateEndpointConnectionListResult() @@ -36,8 +36,8 @@ public partial interface IPrivateEndpointConnectionListResult : ReadOnly = false, Description = @"The collection value.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection[] Value { get; set; } } /// A list of private endpoint connections @@ -45,7 +45,7 @@ internal partial interface IPrivateEndpointConnectionListResultInternal { /// The collection value. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection[] Value { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.json.cs index 5b17e7cf821d..35d76e7a0b4f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionListResult.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnectionListResult 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.Api20200901.IPrivateEndpointConnectionListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new PrivateEndpointConnectionListResult(json) : null; } @@ -77,7 +77,7 @@ internal PrivateEndpointConnectionListResult(Microsoft.Azure.PowerShell.Cmdlets. { 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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointConnection.FromJson(__u) )) ))() : null : Value;} + {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnection) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointConnection.FromJson(__u) )) ))() : null : Value;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.PowerShell.cs similarity index 82% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.PowerShell.cs index c5f2de4da873..d8fdfe3349c8 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PrivateEndpointConnectionProperties partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateEndpointConnectionProperties(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateEndpointConnectionProperties(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivate /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties 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. @@ -107,33 +107,33 @@ internal PrivateEndpointConnectionProperties(global::System.Collections.IDiction // actually deserialize if (content.Contains("PrivateEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointTypeConverter.ConvertFrom); } if (content.Contains("PrivateLinkServiceConnectionState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); } if (content.Contains("PrivateEndpointId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); } 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. @@ -148,27 +148,27 @@ internal PrivateEndpointConnectionProperties(global::System.Management.Automatio // actually deserialize if (content.Contains("PrivateEndpoint")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpointTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint) content.GetValueForProperty("PrivateEndpoint",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpoint, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpointTypeConverter.ConvertFrom); } if (content.Contains("PrivateLinkServiceConnectionState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState) content.GetValueForProperty("PrivateLinkServiceConnectionState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkServiceConnectionStateTypeConverter.ConvertFrom); } if (content.Contains("ProvisioningState")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState?) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).ProvisioningState, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState.CreateFrom); } if (content.Contains("PrivateEndpointId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId = (string) content.GetValueForProperty("PrivateEndpointId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateEndpointId, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateDescription")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription = (string) content.GetValueForProperty("PrivateLinkServiceConnectionStateDescription",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateDescription, global::System.Convert.ToString); } if (content.Contains("PrivateLinkServiceConnectionStateStatus")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("PrivateLinkServiceConnectionStateStatus",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal)this).PrivateLinkServiceConnectionStateStatus, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.TypeConverter.cs index 32b11407a3e3..f209bbbc9291 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -108,14 +108,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.cs similarity index 81% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.cs index eb67a62d8018..4244b78ad20a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.cs @@ -3,52 +3,52 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Properties of a private endpoint connection. public partial class PrivateEndpointConnectionProperties : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal { /// Internal Acessors for PrivateEndpoint - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpoint()); set { {_privateEndpoint = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal.PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpoint()); set { {_privateEndpoint = value;} } } /// Internal Acessors for PrivateLinkServiceConnectionState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal.PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkServiceConnectionState()); set { {_privateLinkServiceConnectionState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal.PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkServiceConnectionState()); set { {_privateLinkServiceConnectionState = value;} } } /// Internal Acessors for ProvisioningState - Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionPropertiesInternal.ProvisioningState { get => this._provisioningState; set { {_provisioningState = value;} } } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint _privateEndpoint; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint _privateEndpoint; /// The resource of private endpoint. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpoint()); set => this._privateEndpoint = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint PrivateEndpoint { get => (this._privateEndpoint = this._privateEndpoint ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpoint()); set => this._privateEndpoint = value; } - /// The resource Id for private endpoint + /// The resource ID of the private endpoint [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointInternal)PrivateEndpoint).Id = value ?? null; } + public string PrivateEndpointId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointInternal)PrivateEndpoint).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointInternal)PrivateEndpoint).Id = value ?? null; } /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState _privateLinkServiceConnectionState; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState _privateLinkServiceConnectionState; /// /// A collection of information about the state of the connection between service consumer and provider. /// [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkServiceConnectionState()); set => this._privateLinkServiceConnectionState = value; } + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get => (this._privateLinkServiceConnectionState = this._privateLinkServiceConnectionState ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkServiceConnectionState()); set => this._privateLinkServiceConnectionState = value; } /// The private link service connection description. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description = value ?? null; } + public string PrivateLinkServiceConnectionStateDescription { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Description = value ?? null; } /// The private link service connection status. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus)""); } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus? PrivateLinkServiceConnectionStateStatus { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)PrivateLinkServiceConnectionState).Status = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus)""); } /// Backing field for property. private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState? _provisioningState; @@ -67,11 +67,11 @@ public PrivateEndpointConnectionProperties() public partial interface IPrivateEndpointConnectionProperties : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// The resource Id for private endpoint + /// The resource ID of the private endpoint [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The resource Id for private endpoint", + Description = @"The resource ID of the private endpoint", SerializedName = @"id", PossibleTypes = new [] { typeof(string) })] string PrivateEndpointId { get; set; } @@ -106,13 +106,13 @@ internal partial interface IPrivateEndpointConnectionPropertiesInternal { /// The resource of private endpoint. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpoint PrivateEndpoint { get; set; } - /// The resource Id for private endpoint + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpoint PrivateEndpoint { get; set; } + /// The resource ID of the private endpoint string PrivateEndpointId { get; set; } /// /// A collection of information about the state of the connection between service consumer and provider. /// - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState PrivateLinkServiceConnectionState { get; set; } /// The private link service connection description. string PrivateLinkServiceConnectionStateDescription { get; set; } /// The private link service connection status. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.json.cs index d4ba3e8e35ec..55246e4fece2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateEndpointConnectionProperties.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateEndpointConnectionProperties.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateEndpointConnectionProperties 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.Api20200901.IPrivateEndpointConnectionProperties. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateEndpointConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateEndpointConnectionProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new PrivateEndpointConnectionProperties(json) : null; } @@ -77,8 +77,8 @@ internal PrivateEndpointConnectionProperties(Microsoft.Azure.PowerShell.Cmdlets. { return; } - {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateEndpoint.FromJson(__jsonPrivateEndpoint) : PrivateEndpoint;} - {_privateLinkServiceConnectionState = If( json?.PropertyT("privateLinkServiceConnectionState"), out var __jsonPrivateLinkServiceConnectionState) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkServiceConnectionState.FromJson(__jsonPrivateLinkServiceConnectionState) : PrivateLinkServiceConnectionState;} + {_privateEndpoint = If( json?.PropertyT("privateEndpoint"), out var __jsonPrivateEndpoint) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateEndpoint.FromJson(__jsonPrivateEndpoint) : PrivateEndpoint;} + {_privateLinkServiceConnectionState = If( json?.PropertyT("privateLinkServiceConnectionState"), out var __jsonPrivateLinkServiceConnectionState) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkServiceConnectionState.FromJson(__jsonPrivateLinkServiceConnectionState) : PrivateLinkServiceConnectionState;} {_provisioningState = If( json?.PropertyT("provisioningState"), out var __jsonProvisioningState) ? (string)__jsonProvisioningState : (string)ProvisioningState;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.PowerShell.cs similarity index 82% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.PowerShell.cs index 04bf05e651c0..deb25c02d612 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PrivateLinkResource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IPrivateLinkResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateLinkResource(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.Api20200901.IPrivateLinkResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateLinkResource(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivate ///
/// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource 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. @@ -103,33 +103,33 @@ internal PrivateLinkResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); } if (content.Contains("RequiredMember")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("PrivateLinkServiceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).PrivateLinkServiceId = (string) content.GetValueForProperty("PrivateLinkServiceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).PrivateLinkServiceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).PrivateLinkServiceId = (string) content.GetValueForProperty("PrivateLinkServiceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).PrivateLinkServiceId, 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. @@ -144,27 +144,27 @@ internal PrivateLinkResource(global::System.Management.Automation.PSObject conte // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).Type, global::System.Convert.ToString); } if (content.Contains("GroupId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).GroupId = (string) content.GetValueForProperty("GroupId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).GroupId, global::System.Convert.ToString); } if (content.Contains("RequiredMember")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).RequiredMember = (string[]) content.GetValueForProperty("RequiredMember",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).RequiredMember, __y => TypeConverterExtensions.SelectToArray(__y, global::System.Convert.ToString)); } if (content.Contains("PrivateLinkServiceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).PrivateLinkServiceId = (string) content.GetValueForProperty("PrivateLinkServiceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal)this).PrivateLinkServiceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).PrivateLinkServiceId = (string) content.GetValueForProperty("PrivateLinkServiceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal)this).PrivateLinkServiceId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.TypeConverter.cs index 63b0c1d0108b..877152bdc7fe 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.cs similarity index 92% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.cs index 82e7d1fb998c..0b548584d98d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// A private link resource public partial class PrivateLinkResource : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal { /// Backing field for property. @@ -28,7 +28,7 @@ public partial class PrivateLinkResource : public string Id { get => this._id; set => this._id = value; } /// Internal Acessors for PrivateLinkServiceId - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourceInternal.PrivateLinkServiceId { get => this._privateLinkServiceId; set { {_privateLinkServiceId = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourceInternal.PrivateLinkServiceId { get => this._privateLinkServiceId; set { {_privateLinkServiceId = value;} } } /// Backing field for property. private string _name; @@ -49,7 +49,7 @@ public partial class PrivateLinkResource : /// Backing field for property. private string[] _requiredMember; - /// RequiredMembers of the resource + /// The RequiredMembers of the resource [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string[] RequiredMember { get => this._requiredMember; set => this._requiredMember = value; } @@ -104,11 +104,11 @@ public partial interface IPrivateLinkResource : SerializedName = @"privateLinkServiceID", PossibleTypes = new [] { typeof(string) })] string PrivateLinkServiceId { get; } - /// RequiredMembers of the resource + /// The RequiredMembers of the resource [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"RequiredMembers of the resource", + Description = @"The RequiredMembers of the resource", SerializedName = @"requiredMembers", PossibleTypes = new [] { typeof(string) })] string[] RequiredMember { get; set; } @@ -136,7 +136,7 @@ internal partial interface IPrivateLinkResourceInternal /// The private link service ID of the resource, this field is exposed only to NRP internally. /// string PrivateLinkServiceId { get; set; } - /// RequiredMembers of the resource + /// The RequiredMembers of the resource string[] RequiredMember { get; set; } /// The resource type. string Type { get; set; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.json.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.json.cs index 9d57ba4934be..ae15beeb4ce1 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResource.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateLinkResource 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.Api20200901.IPrivateLinkResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new PrivateLinkResource(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.PowerShell.cs similarity index 85% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.PowerShell.cs index 02d9249a411b..754f0204f31f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class PrivateLinkResourcesListResult partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IPrivateLinkResourcesListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateLinkResourcesListResult(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.Api20200901.IPrivateLinkResourcesListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateLinkResourcesListResult(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivate /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResult FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResult 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. @@ -103,13 +103,13 @@ internal PrivateLinkResourcesListResult(global::System.Collections.IDictionary c // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkResourceTypeConverter.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. @@ -124,7 +124,7 @@ internal PrivateLinkResourcesListResult(global::System.Management.Automation.PSO // actually deserialize if (content.Contains("Value")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkResourceTypeConverter.ConvertFrom)); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkResourceTypeConverter.ConvertFrom)); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.TypeConverter.cs index 9665f23f70eb..c833d3914cb0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResult ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResult ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResult).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResult).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.cs similarity index 79% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.cs index a473019a0979..be6648e069d1 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// A list of private link resources public partial class PrivateLinkResourcesListResult : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResult, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResultInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResultInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource[] _value; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] _value; /// The collection value. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource[] Value { get => this._value; set => this._value = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] Value { get => this._value; set => this._value = value; } /// Creates an new instance. public PrivateLinkResourcesListResult() @@ -36,8 +36,8 @@ public partial interface IPrivateLinkResourcesListResult : ReadOnly = false, Description = @"The collection value.", SerializedName = @"value", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource[] Value { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] Value { get; set; } } /// A list of private link resources @@ -45,7 +45,7 @@ internal partial interface IPrivateLinkResourcesListResultInternal { /// The collection value. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource[] Value { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource[] Value { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.json.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.json.cs index dae0bc51ed58..8ca75944b5dc 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkResourcesListResult.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkResourcesListResult.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateLinkResourcesListResult 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.Api20200901.IPrivateLinkResourcesListResult. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResult. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResult. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResult. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResourcesListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResourcesListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new PrivateLinkResourcesListResult(json) : null; } @@ -77,7 +77,7 @@ internal PrivateLinkResourcesListResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.R { 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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkResource) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.PrivateLinkResource.FromJson(__u) )) ))() : null : Value;} + {_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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkResource) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.PrivateLinkResource.FromJson(__u) )) ))() : null : Value;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.PowerShell.cs similarity index 88% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.PowerShell.cs index 0ae3b465de12..2ab4f474da8d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,29 +55,29 @@ public partial class PrivateLinkServiceConnectionState partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new PrivateLinkServiceConnectionState(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 . /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new PrivateLinkServiceConnectionState(content); } @@ -89,10 +89,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivate /// /// an instance of the model class. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState 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. @@ -107,17 +107,17 @@ internal PrivateLinkServiceConnectionState(global::System.Collections.IDictionar // actually deserialize if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)this).Description, 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. @@ -132,11 +132,11 @@ internal PrivateLinkServiceConnectionState(global::System.Management.Automation. // actually deserialize if (content.Contains("Status")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)this).Status = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus?) content.GetValueForProperty("Status",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)this).Status, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ConnectionStatus.CreateFrom); } if (content.Contains("Description")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal)this).Description, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)this).Description = (string) content.GetValueForProperty("Description",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal)this).Description, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.TypeConverter.cs index 96cff4202999..85ff331ba40a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -107,14 +107,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.cs index fe1bfabd7776..87f1691d83c8 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// The state of a private link service connection. public partial class PrivateLinkServiceConnectionState : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionStateInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionStateInternal { /// Backing field for property. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.json.cs index 9478b435ac1a..c4e8b9f771dd 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/PrivateLinkServiceConnectionState.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/PrivateLinkServiceConnectionState.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class PrivateLinkServiceConnectionState 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.Api20200901.IPrivateLinkServiceConnectionState. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IPrivateLinkServiceConnectionState FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IPrivateLinkServiceConnectionState FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new PrivateLinkServiceConnectionState(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.PowerShell.cs similarity index 89% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.PowerShell.cs index e3786994d206..1bbbe83f6e03 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class ResourceReference partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IResourceReference DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new ResourceReference(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.Api20200901.IResourceReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new ResourceReference(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourc /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference 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. @@ -103,13 +103,13 @@ internal ResourceReference(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReferenceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReferenceInternal)this).Id, 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. @@ -124,7 +124,7 @@ internal ResourceReference(global::System.Management.Automation.PSObject content // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReferenceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReferenceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReferenceInternal)this).Id, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.TypeConverter.cs index bd9f19a9241e..d26305d1ba80 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.cs similarity index 90% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.cs index 79664df0cec0..87aef6b180a6 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// A reference to an Azure resource. public partial class ResourceReference : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReferenceInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReferenceInternal { /// Backing field for property. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.json.cs index b723e62be11a..1c595666e225 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceReference.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/ResourceReference.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class ResourceReference 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.Api20200901.IResourceReference. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IResourceReference FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ResourceReference(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.PowerShell.cs new file mode 100644 index 000000000000..785b93ae129e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// A run command request + [System.ComponentModel.TypeConverter(typeof(RunCommandRequestTypeConverter))] + public partial class RunCommandRequest + { + + /// + /// 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); + + /// + /// 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.Api20230201.IRunCommandRequest DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RunCommandRequest(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.Api20230201.IRunCommandRequest DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RunCommandRequest(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.Api20230201.IRunCommandRequest 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 RunCommandRequest(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Command")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).Command = (string) content.GetValueForProperty("Command",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).Command, global::System.Convert.ToString); + } + if (content.Contains("Context")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).Context = (string) content.GetValueForProperty("Context",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).Context, global::System.Convert.ToString); + } + if (content.Contains("ClusterToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).ClusterToken = (string) content.GetValueForProperty("ClusterToken",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).ClusterToken, 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 RunCommandRequest(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Command")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).Command = (string) content.GetValueForProperty("Command",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).Command, global::System.Convert.ToString); + } + if (content.Contains("Context")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).Context = (string) content.GetValueForProperty("Context",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).Context, global::System.Convert.ToString); + } + if (content.Contains("ClusterToken")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).ClusterToken = (string) content.GetValueForProperty("ClusterToken",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal)this).ClusterToken, 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(); + } + /// A run command request + [System.ComponentModel.TypeConverter(typeof(RunCommandRequestTypeConverter))] + public partial interface IRunCommandRequest + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.TypeConverter.cs new file mode 100644 index 000000000000..83775757fdef --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RunCommandRequestTypeConverter : 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.Api20230201.IRunCommandRequest ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequest).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RunCommandRequest.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RunCommandRequest.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RunCommandRequest.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.cs new file mode 100644 index 000000000000..65d95d361db2 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// A run command request + public partial class RunCommandRequest : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequest, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequestInternal + { + + /// Backing field for property. + private string _clusterToken; + + /// AuthToken issued for AKS AAD Server App. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string ClusterToken { get => this._clusterToken; set => this._clusterToken = value; } + + /// Backing field for property. + private string _command; + + /// The command to run. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Command { get => this._command; set => this._command = value; } + + /// Backing field for property. + private string _context; + + /// A base64 encoded zip file containing the files required by the command. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Context { get => this._context; set => this._context = value; } + + /// Creates an new instance. + public RunCommandRequest() + { + + } + } + /// A run command request + public partial interface IRunCommandRequest : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// AuthToken issued for AKS AAD Server App. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"AuthToken issued for AKS AAD Server App.", + SerializedName = @"clusterToken", + PossibleTypes = new [] { typeof(string) })] + string ClusterToken { get; set; } + /// The command to run. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The command to run.", + SerializedName = @"command", + PossibleTypes = new [] { typeof(string) })] + string Command { get; set; } + /// A base64 encoded zip file containing the files required by the command. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"A base64 encoded zip file containing the files required by the command.", + SerializedName = @"context", + PossibleTypes = new [] { typeof(string) })] + string Context { get; set; } + + } + /// A run command request + internal partial interface IRunCommandRequestInternal + + { + /// AuthToken issued for AKS AAD Server App. + string ClusterToken { get; set; } + /// The command to run. + string Command { get; set; } + /// A base64 encoded zip file containing the files required by the command. + string Context { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.json.cs new file mode 100644 index 000000000000..3ff490b61598 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandRequest.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// A run command request + public partial class RunCommandRequest + { + + /// + /// 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.Api20230201.IRunCommandRequest. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequest. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequest FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new RunCommandRequest(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 RunCommandRequest(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_command = If( json?.PropertyT("command"), out var __jsonCommand) ? (string)__jsonCommand : (string)Command;} + {_context = If( json?.PropertyT("context"), out var __jsonContext) ? (string)__jsonContext : (string)Context;} + {_clusterToken = If( json?.PropertyT("clusterToken"), out var __jsonClusterToken) ? (string)__jsonClusterToken : (string)ClusterToken;} + 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._command)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._command.ToString()) : null, "command" ,container.Add ); + AddIf( null != (((object)this._context)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._context.ToString()) : null, "context" ,container.Add ); + AddIf( null != (((object)this._clusterToken)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._clusterToken.ToString()) : null, "clusterToken" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.PowerShell.cs new file mode 100644 index 000000000000..441616cbe225 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.PowerShell.cs @@ -0,0 +1,200 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// run command result. + [System.ComponentModel.TypeConverter(typeof(RunCommandResultTypeConverter))] + public partial class RunCommandResult + { + + /// + /// 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); + + /// + /// 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.Api20230201.IRunCommandResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new RunCommandResult(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.Api20230201.IRunCommandResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new RunCommandResult(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.Api20230201.IRunCommandResult 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 RunCommandResult(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.Api20230201.IRunCommandResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CommandResultPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).ExitCode = (int?) content.GetValueForProperty("ExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).ExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).StartedAt = (global::System.DateTime?) content.GetValueForProperty("StartedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).StartedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FinishedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).FinishedAt = (global::System.DateTime?) content.GetValueForProperty("FinishedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).FinishedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Log")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Log = (string) content.GetValueForProperty("Log",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Log, global::System.Convert.ToString); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Reason, 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 RunCommandResult(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.Api20230201.IRunCommandResultInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CommandResultPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("ProvisioningState")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).ProvisioningState = (string) content.GetValueForProperty("ProvisioningState",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).ProvisioningState, global::System.Convert.ToString); + } + if (content.Contains("ExitCode")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).ExitCode = (int?) content.GetValueForProperty("ExitCode",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).ExitCode, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("StartedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).StartedAt = (global::System.DateTime?) content.GetValueForProperty("StartedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).StartedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("FinishedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).FinishedAt = (global::System.DateTime?) content.GetValueForProperty("FinishedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).FinishedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("Log")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Log = (string) content.GetValueForProperty("Log",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Log, global::System.Convert.ToString); + } + if (content.Contains("Reason")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Reason = (string) content.GetValueForProperty("Reason",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal)this).Reason, 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(); + } + /// run command result. + [System.ComponentModel.TypeConverter(typeof(RunCommandResultTypeConverter))] + public partial interface IRunCommandResult + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.TypeConverter.cs new file mode 100644 index 000000000000..0062183dc4de --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class RunCommandResultTypeConverter : 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.Api20230201.IRunCommandResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return RunCommandResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return RunCommandResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return RunCommandResult.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.cs new file mode 100644 index 000000000000..e80d40772fb4 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.cs @@ -0,0 +1,168 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// run command result. + public partial class RunCommandResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal + { + + /// The exit code of the command + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public int? ExitCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).ExitCode; } + + /// The time when the command finished. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? FinishedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).FinishedAt; } + + /// Backing field for property. + private string _id; + + /// The command id. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Id { get => this._id; } + + /// The command output. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string Log { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).Log; } + + /// Internal Acessors for ExitCode + int? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal.ExitCode { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).ExitCode; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).ExitCode = value; } + + /// Internal Acessors for FinishedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal.FinishedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).FinishedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).FinishedAt = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Log + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal.Log { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).Log; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).Log = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CommandResultProperties()); set { {_property = value;} } } + + /// Internal Acessors for ProvisioningState + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal.ProvisioningState { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).ProvisioningState; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).ProvisioningState = value; } + + /// Internal Acessors for Reason + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal.Reason { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).Reason; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).Reason = value; } + + /// Internal Acessors for StartedAt + global::System.DateTime? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResultInternal.StartedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).StartedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).StartedAt = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties _property; + + /// Properties of command result. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CommandResultProperties()); set => this._property = value; } + + /// 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.Api20230201.ICommandResultPropertiesInternal)Property).ProvisioningState; } + + /// An explanation of why provisioningState is set to failed (if so). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string Reason { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).Reason; } + + /// The time when the command started. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? StartedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultPropertiesInternal)Property).StartedAt; } + + /// Creates an new instance. + public RunCommandResult() + { + + } + } + /// run command result. + public partial interface IRunCommandResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The exit code of the command + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The exit code of the command", + SerializedName = @"exitCode", + PossibleTypes = new [] { typeof(int) })] + int? ExitCode { get; } + /// The time when the command finished. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The time when the command finished.", + SerializedName = @"finishedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? FinishedAt { get; } + /// The command id. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The command id.", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The command output. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The command output.", + SerializedName = @"logs", + PossibleTypes = new [] { typeof(string) })] + string Log { get; } + /// provisioning State + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"provisioning State", + SerializedName = @"provisioningState", + PossibleTypes = new [] { typeof(string) })] + string ProvisioningState { get; } + /// An explanation of why provisioningState is set to failed (if so). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"An explanation of why provisioningState is set to failed (if so).", + SerializedName = @"reason", + PossibleTypes = new [] { typeof(string) })] + string Reason { get; } + /// The time when the command started. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The time when the command started.", + SerializedName = @"startedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? StartedAt { get; } + + } + /// run command result. + internal partial interface IRunCommandResultInternal + + { + /// The exit code of the command + int? ExitCode { get; set; } + /// The time when the command finished. + global::System.DateTime? FinishedAt { get; set; } + /// The command id. + string Id { get; set; } + /// The command output. + string Log { get; set; } + /// Properties of command result. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICommandResultProperties Property { get; set; } + /// provisioning State + string ProvisioningState { get; set; } + /// An explanation of why provisioningState is set to failed (if so). + string Reason { get; set; } + /// The time when the command started. + global::System.DateTime? StartedAt { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.json.cs new file mode 100644 index 000000000000..18fd48a19ce2 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/RunCommandResult.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// run command result. + public partial class RunCommandResult + { + + /// + /// 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.Api20230201.IRunCommandResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new RunCommandResult(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 RunCommandResult(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CommandResultProperties.FromJson(__jsonProperties) : Property;} + {_id = If( json?.PropertyT("id"), out var __jsonId) ? (string)__jsonId : (string)Id;} + 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._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.IncludeReadOnly)) + { + 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; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.PowerShell.cs new file mode 100644 index 000000000000..2a2c44ae92a9 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.PowerShell.cs @@ -0,0 +1,312 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// A node pool snapshot resource. + [System.ComponentModel.TypeConverter(typeof(SnapshotTypeConverter))] + public partial class Snapshot + { + + /// + /// 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); + + /// + /// 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.Api20230201.ISnapshot DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Snapshot(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.Api20230201.ISnapshot DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Snapshot(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.Api20230201.ISnapshot 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 Snapshot(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.Api20230201.ISnapshotInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("CreationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationDataTypeConverter.ConvertFrom); + } + if (content.Contains("SnapshotType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).SnapshotType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType?) content.GetValueForProperty("SnapshotType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).SnapshotType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType.CreateFrom); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("NodeImageVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).NodeImageVersion, global::System.Convert.ToString); + } + if (content.Contains("OSSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).OSSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku?) content.GetValueForProperty("OSSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).OSSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku.CreateFrom); + } + if (content.Contains("VMSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).VMSize = (string) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).VMSize, global::System.Convert.ToString); + } + if (content.Contains("EnableFips")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).EnableFips = (bool?) content.GetValueForProperty("EnableFips",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).EnableFips, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CreationDataSourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).CreationDataSourceResourceId, 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 Snapshot(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.Api20230201.ISnapshotInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotPropertiesTypeConverter.ConvertFrom); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("CreationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationDataTypeConverter.ConvertFrom); + } + if (content.Contains("SnapshotType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).SnapshotType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType?) content.GetValueForProperty("SnapshotType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).SnapshotType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType.CreateFrom); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("NodeImageVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).NodeImageVersion, global::System.Convert.ToString); + } + if (content.Contains("OSSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).OSSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku?) content.GetValueForProperty("OSSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).OSSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku.CreateFrom); + } + if (content.Contains("VMSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).VMSize = (string) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).VMSize, global::System.Convert.ToString); + } + if (content.Contains("EnableFips")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).EnableFips = (bool?) content.GetValueForProperty("EnableFips",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).EnableFips, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CreationDataSourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal)this).CreationDataSourceResourceId, 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(); + } + /// A node pool snapshot resource. + [System.ComponentModel.TypeConverter(typeof(SnapshotTypeConverter))] + public partial interface ISnapshot + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.TypeConverter.cs new file mode 100644 index 000000000000..f91370487c5f --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SnapshotTypeConverter : 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.Api20230201.ISnapshot ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return Snapshot.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return Snapshot.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return Snapshot.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.cs new file mode 100644 index 000000000000..a50c2b3d25fc --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.cs @@ -0,0 +1,276 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// A node pool snapshot resource. + public partial class Snapshot : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResource __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResource(); + + /// This is the ARM ID of the source object to be used to create the target object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string CreationDataSourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).CreationDataSourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).CreationDataSourceResourceId = value ?? null; } + + /// Whether to use a FIPS-enabled OS. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public bool? EnableFips { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).EnableFips; } + + /// + /// Fully qualified resource ID for the resource. Ex - /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.Api30.IResourceInternal)__trackedResource).Id; } + + /// The version of Kubernetes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).KubernetesVersion; } + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public string Location { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Location; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Location = value ; } + + /// Internal Acessors for CreationData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal.CreationData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).CreationData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).CreationData = value; } + + /// Internal Acessors for EnableFips + bool? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal.EnableFips { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).EnableFips; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).EnableFips = value; } + + /// Internal Acessors for KubernetesVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal.KubernetesVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).KubernetesVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).KubernetesVersion = value; } + + /// Internal Acessors for NodeImageVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal.NodeImageVersion { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).NodeImageVersion; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).NodeImageVersion = value; } + + /// Internal Acessors for OSSku + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal.OSSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).OSSku; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).OSSku = value; } + + /// Internal Acessors for OSType + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal.OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).OSType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).OSType = value; } + + /// Internal Acessors for Property + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotProperties Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal.Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotProperties()); set { {_property = value;} } } + + /// Internal Acessors for VMSize + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotInternal.VMSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).VMSize; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).VMSize = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).Type = value; } + + /// 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.Api30.IResourceInternal)__trackedResource).Name; } + + /// 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.Api20230201.ISnapshotPropertiesInternal)Property).NodeImageVersion; } + + /// + /// 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).OSSku; } + + /// The operating system type. The default is Linux. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).OSType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotProperties _property; + + /// Properties of a snapshot. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotProperties Property { get => (this._property = this._property ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotProperties()); set => this._property = value; } + + /// The type of a snapshot. The default is NodePool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType? SnapshotType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).SnapshotType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).SnapshotType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType)""); } + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemData; } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// 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.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__trackedResource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags Tag { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)__trackedResource).Tag = value ?? null /* model class */; } + + /// + /// 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.Api30.IResourceInternal)__trackedResource).Type; } + + /// The size of the VM. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string VMSize { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)Property).VMSize; } + + /// Creates an new instance. + public Snapshot() + { + + } + + /// 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(__trackedResource), __trackedResource); + await eventListener.AssertObjectIsValid(nameof(__trackedResource), __trackedResource); + } + } + /// A node pool snapshot resource. + public partial interface ISnapshot : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResource + { + /// This is the ARM ID of the source object to be used to create the target object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the ARM ID of the source object to be used to create the target object.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string CreationDataSourceResourceId { get; set; } + /// Whether to use a FIPS-enabled OS. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Whether to use a FIPS-enabled OS.", + SerializedName = @"enableFIPS", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableFips { get; } + /// The version of Kubernetes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The version of Kubernetes.", + SerializedName = @"kubernetesVersion", + PossibleTypes = new [] { typeof(string) })] + string KubernetesVersion { get; } + /// The version of node image. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The version of node image.", + SerializedName = @"nodeImageVersion", + PossibleTypes = new [] { typeof(string) })] + string NodeImageVersion { get; } + /// + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + /// Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + 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(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get; } + /// The operating system type. The default is Linux. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The operating system type. The default is Linux.", + SerializedName = @"osType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get; } + /// The type of a snapshot. The default is NodePool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of a snapshot. The default is NodePool.", + SerializedName = @"snapshotType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType? SnapshotType { get; set; } + /// The size of the VM. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The size of the VM.", + SerializedName = @"vmSize", + PossibleTypes = new [] { typeof(string) })] + string VMSize { get; } + + } + /// A node pool snapshot resource. + internal partial interface ISnapshotInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal + { + /// + /// CreationData to be used to specify the source agent pool resource ID to create this snapshot. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData CreationData { get; set; } + /// This is the ARM ID of the source object to be used to create the target object. + string CreationDataSourceResourceId { get; set; } + /// Whether to use a FIPS-enabled OS. + bool? EnableFips { get; set; } + /// The version of Kubernetes. + string KubernetesVersion { get; set; } + /// The version of node image. + string NodeImageVersion { get; set; } + /// + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + /// Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get; set; } + /// The operating system type. The default is Linux. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get; set; } + /// Properties of a snapshot. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotProperties Property { get; set; } + /// The type of a snapshot. The default is NodePool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType? SnapshotType { get; set; } + /// The size of the VM. + string VMSize { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.json.cs similarity index 79% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.json.cs index 3ae355386e87..ee739f87dd36 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/BaseManagedCluster.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/Snapshot.json.cs @@ -3,11 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - public partial class BaseManagedCluster + /// A node pool snapshot resource. + public partial class Snapshot { /// @@ -53,10 +54,22 @@ public partial class BaseManagedCluster 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.Api20230201.ISnapshot. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new Snapshot(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 BaseManagedCluster(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal Snapshot(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -64,31 +77,19 @@ internal BaseManagedCluster(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json. { return; } - {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterProperties.FromJson(__jsonProperties) : Property;} - {_identity = If( json?.PropertyT("identity"), out var __jsonIdentity) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ManagedClusterIdentity.FromJson(__jsonIdentity) : Identity;} + __trackedResource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResource(json); + {_property = If( json?.PropertyT("properties"), out var __jsonProperties) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotProperties.FromJson(__jsonProperties) : Property;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedCluster. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedCluster. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IBaseManagedCluster FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new BaseManagedCluster(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) { @@ -100,8 +101,8 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } + __trackedResource?.ToJson(container, serializationMode); AddIf( null != this._property ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._property.ToJson(null,serializationMode) : null, "properties" ,container.Add ); - AddIf( null != this._identity ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._identity.ToJson(null,serializationMode) : null, "identity" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.PowerShell.cs new file mode 100644 index 000000000000..e4e71cc7ba61 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// The response from the List Snapshots operation. + [System.ComponentModel.TypeConverter(typeof(SnapshotListResultTypeConverter))] + public partial class SnapshotListResult + { + + /// + /// 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); + + /// + /// 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.Api20230201.ISnapshotListResult DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SnapshotListResult(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.Api20230201.ISnapshotListResult DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SnapshotListResult(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.Api20230201.ISnapshotListResult 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 SnapshotListResult(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.Api20230201.ISnapshotListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResultInternal)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 SnapshotListResult(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.Api20230201.ISnapshotListResultInternal)this).Value = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot[]) content.GetValueForProperty("Value",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResultInternal)this).Value, __y => TypeConverterExtensions.SelectToArray(__y, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.SnapshotTypeConverter.ConvertFrom)); + } + if (content.Contains("NextLink")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResultInternal)this).NextLink = (string) content.GetValueForProperty("NextLink",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResultInternal)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(); + } + /// The response from the List Snapshots operation. + [System.ComponentModel.TypeConverter(typeof(SnapshotListResultTypeConverter))] + public partial interface ISnapshotListResult + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.TypeConverter.cs new file mode 100644 index 000000000000..d5915d1c99b6 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SnapshotListResultTypeConverter : 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.Api20230201.ISnapshotListResult ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResult).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SnapshotListResult.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SnapshotListResult.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SnapshotListResult.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.cs new file mode 100644 index 000000000000..9d90f7c05e86 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.cs @@ -0,0 +1,71 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The response from the List Snapshots operation. + public partial class SnapshotListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResult, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResultInternal + { + + /// Internal Acessors for NextLink + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResultInternal.NextLink { get => this._nextLink; set { {_nextLink = value;} } } + + /// Backing field for property. + private string _nextLink; + + /// The URL to get the next set of snapshot 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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot[] _value; + + /// The list of snapshots. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot[] Value { get => this._value; set => this._value = value; } + + /// Creates an new instance. + public SnapshotListResult() + { + + } + } + /// The response from the List Snapshots operation. + public partial interface ISnapshotListResult : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The URL to get the next set of snapshot results. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The URL to get the next set of snapshot results.", + SerializedName = @"nextLink", + PossibleTypes = new [] { typeof(string) })] + string NextLink { get; } + /// The list of snapshots. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The list of snapshots.", + SerializedName = @"value", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot[] Value { get; set; } + + } + /// The response from the List Snapshots operation. + internal partial interface ISnapshotListResultInternal + + { + /// The URL to get the next set of snapshot results. + string NextLink { get; set; } + /// The list of snapshots. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot[] Value { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.json.cs new file mode 100644 index 000000000000..e535cebb42a3 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotListResult.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// The response from the List Snapshots operation. + public partial class SnapshotListResult + { + + /// + /// 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.Api20230201.ISnapshotListResult. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResult. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotListResult FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new SnapshotListResult(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 SnapshotListResult(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.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot) (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.Snapshot.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.IncludeReadOnly)) + { + 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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.PowerShell.cs new file mode 100644 index 000000000000..0a62f7cbb398 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Properties used to configure a node pool snapshot. + [System.ComponentModel.TypeConverter(typeof(SnapshotPropertiesTypeConverter))] + public partial class SnapshotProperties + { + + /// + /// 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); + + /// + /// 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.Api20230201.ISnapshotProperties DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SnapshotProperties(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.Api20230201.ISnapshotProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SnapshotProperties(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.Api20230201.ISnapshotProperties 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 SnapshotProperties(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationDataTypeConverter.ConvertFrom); + } + if (content.Contains("SnapshotType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).SnapshotType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType?) content.GetValueForProperty("SnapshotType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).SnapshotType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType.CreateFrom); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("NodeImageVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).NodeImageVersion, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + } + if (content.Contains("OSSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).OSSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku?) content.GetValueForProperty("OSSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).OSSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku.CreateFrom); + } + if (content.Contains("VMSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).VMSize = (string) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).VMSize, global::System.Convert.ToString); + } + if (content.Contains("EnableFips")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).EnableFips = (bool?) content.GetValueForProperty("EnableFips",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).EnableFips, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CreationDataSourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).CreationDataSourceResourceId, 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 SnapshotProperties(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreationData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).CreationData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData) content.GetValueForProperty("CreationData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).CreationData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationDataTypeConverter.ConvertFrom); + } + if (content.Contains("SnapshotType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).SnapshotType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType?) content.GetValueForProperty("SnapshotType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).SnapshotType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType.CreateFrom); + } + if (content.Contains("KubernetesVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).KubernetesVersion = (string) content.GetValueForProperty("KubernetesVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).KubernetesVersion, global::System.Convert.ToString); + } + if (content.Contains("NodeImageVersion")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).NodeImageVersion = (string) content.GetValueForProperty("NodeImageVersion",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).NodeImageVersion, global::System.Convert.ToString); + } + if (content.Contains("OSType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).OSType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType?) content.GetValueForProperty("OSType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).OSType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType.CreateFrom); + } + if (content.Contains("OSSku")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).OSSku = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku?) content.GetValueForProperty("OSSku",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).OSSku, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku.CreateFrom); + } + if (content.Contains("VMSize")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).VMSize = (string) content.GetValueForProperty("VMSize",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).VMSize, global::System.Convert.ToString); + } + if (content.Contains("EnableFips")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).EnableFips = (bool?) content.GetValueForProperty("EnableFips",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).EnableFips, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("CreationDataSourceResourceId")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).CreationDataSourceResourceId = (string) content.GetValueForProperty("CreationDataSourceResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal)this).CreationDataSourceResourceId, 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(); + } + /// Properties used to configure a node pool snapshot. + [System.ComponentModel.TypeConverter(typeof(SnapshotPropertiesTypeConverter))] + public partial interface ISnapshotProperties + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.TypeConverter.cs new file mode 100644 index 000000000000..56a6ff5561b9 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SnapshotPropertiesTypeConverter : 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.Api20230201.ISnapshotProperties ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotProperties).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SnapshotProperties.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SnapshotProperties.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SnapshotProperties.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.cs new file mode 100644 index 000000000000..01515f3b1fc0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.cs @@ -0,0 +1,210 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Properties used to configure a node pool snapshot. + public partial class SnapshotProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotProperties, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData _creationData; + + /// + /// CreationData to be used to specify the source agent pool resource ID to create this snapshot. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData CreationData { get => (this._creationData = this._creationData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationData()); set => this._creationData = value; } + + /// This is the ARM ID of the source object to be used to create the target object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string CreationDataSourceResourceId { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationDataInternal)CreationData).SourceResourceId; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationDataInternal)CreationData).SourceResourceId = value ?? null; } + + /// Backing field for property. + private bool? _enableFips; + + /// Whether to use a FIPS-enabled OS. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? EnableFips { get => this._enableFips; } + + /// Backing field for property. + private string _kubernetesVersion; + + /// The version of Kubernetes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string KubernetesVersion { get => this._kubernetesVersion; } + + /// Internal Acessors for CreationData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal.CreationData { get => (this._creationData = this._creationData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationData()); set { {_creationData = value;} } } + + /// Internal Acessors for EnableFips + bool? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal.EnableFips { get => this._enableFips; set { {_enableFips = value;} } } + + /// Internal Acessors for KubernetesVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal.KubernetesVersion { get => this._kubernetesVersion; set { {_kubernetesVersion = value;} } } + + /// Internal Acessors for NodeImageVersion + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal.NodeImageVersion { get => this._nodeImageVersion; set { {_nodeImageVersion = value;} } } + + /// Internal Acessors for OSSku + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal.OSSku { get => this._oSSku; set { {_oSSku = value;} } } + + /// Internal Acessors for OSType + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal.OSType { get => this._oSType; set { {_oSType = value;} } } + + /// Internal Acessors for VMSize + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotPropertiesInternal.VMSize { get => this._vMSize; set { {_vMSize = value;} } } + + /// Backing field for property. + private string _nodeImageVersion; + + /// The version of node image. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string NodeImageVersion { get => this._nodeImageVersion; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? _oSSku; + + /// + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + /// Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get => this._oSSku; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? _oSType; + + /// The operating system type. The default is Linux. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get => this._oSType; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType? _snapshotType; + + /// The type of a snapshot. The default is NodePool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType? SnapshotType { get => this._snapshotType; set => this._snapshotType = value; } + + /// Backing field for property. + private string _vMSize; + + /// The size of the VM. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string VMSize { get => this._vMSize; } + + /// Creates an new instance. + public SnapshotProperties() + { + + } + } + /// Properties used to configure a node pool snapshot. + public partial interface ISnapshotProperties : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// This is the ARM ID of the source object to be used to create the target object. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"This is the ARM ID of the source object to be used to create the target object.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + string CreationDataSourceResourceId { get; set; } + /// Whether to use a FIPS-enabled OS. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Whether to use a FIPS-enabled OS.", + SerializedName = @"enableFIPS", + PossibleTypes = new [] { typeof(bool) })] + bool? EnableFips { get; } + /// The version of Kubernetes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The version of Kubernetes.", + SerializedName = @"kubernetesVersion", + PossibleTypes = new [] { typeof(string) })] + string KubernetesVersion { get; } + /// The version of node image. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The version of node image.", + SerializedName = @"nodeImageVersion", + PossibleTypes = new [] { typeof(string) })] + string NodeImageVersion { get; } + /// + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + /// Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + 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(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get; } + /// The operating system type. The default is Linux. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The operating system type. The default is Linux.", + SerializedName = @"osType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get; } + /// The type of a snapshot. The default is NodePool. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of a snapshot. The default is NodePool.", + SerializedName = @"snapshotType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType? SnapshotType { get; set; } + /// The size of the VM. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The size of the VM.", + SerializedName = @"vmSize", + PossibleTypes = new [] { typeof(string) })] + string VMSize { get; } + + } + /// Properties used to configure a node pool snapshot. + internal partial interface ISnapshotPropertiesInternal + + { + /// + /// CreationData to be used to specify the source agent pool resource ID to create this snapshot. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICreationData CreationData { get; set; } + /// This is the ARM ID of the source object to be used to create the target object. + string CreationDataSourceResourceId { get; set; } + /// Whether to use a FIPS-enabled OS. + bool? EnableFips { get; set; } + /// The version of Kubernetes. + string KubernetesVersion { get; set; } + /// The version of node image. + string NodeImageVersion { get; set; } + /// + /// Specifies the OS SKU used by the agent pool. The default is Ubuntu if OSType is Linux. The default is Windows2019 when + /// Kubernetes <= 1.24 or Windows2022 when Kubernetes >= 1.25 if OSType is Windows. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku? OSSku { get; set; } + /// The operating system type. The default is Linux. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType? OSType { get; set; } + /// The type of a snapshot. The default is NodePool. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType? SnapshotType { get; set; } + /// The size of the VM. + string VMSize { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.json.cs similarity index 54% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.json.cs index eca2b496ac00..e83fa8b150e5 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ContainerServiceMasterProfile.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SnapshotProperties.json.cs @@ -3,12 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Profile for the container service master. - public partial class ContainerServiceMasterProfile + /// Properties used to configure a node pool snapshot. + public partial class SnapshotProperties { /// @@ -54,10 +54,22 @@ public partial class ContainerServiceMasterProfile 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.Api20230201.ISnapshotProperties. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotProperties. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshotProperties FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new SnapshotProperties(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 ContainerServiceMasterProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal SnapshotProperties(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -65,37 +77,25 @@ internal ContainerServiceMasterProfile(Microsoft.Azure.PowerShell.Cmdlets.Aks.Ru { return; } - {_count = If( json?.PropertyT("count"), out var __jsonCount) ? (int?)__jsonCount : Count;} - {_dnsPrefix = If( json?.PropertyT("dnsPrefix"), out var __jsonDnsPrefix) ? (string)__jsonDnsPrefix : (string)DnsPrefix;} + {_creationData = If( json?.PropertyT("creationData"), out var __jsonCreationData) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.CreationData.FromJson(__jsonCreationData) : CreationData;} + {_snapshotType = If( json?.PropertyT("snapshotType"), out var __jsonSnapshotType) ? (string)__jsonSnapshotType : (string)SnapshotType;} + {_kubernetesVersion = If( json?.PropertyT("kubernetesVersion"), out var __jsonKubernetesVersion) ? (string)__jsonKubernetesVersion : (string)KubernetesVersion;} + {_nodeImageVersion = If( json?.PropertyT("nodeImageVersion"), out var __jsonNodeImageVersion) ? (string)__jsonNodeImageVersion : (string)NodeImageVersion;} + {_oSType = If( json?.PropertyT("osType"), out var __jsonOSType) ? (string)__jsonOSType : (string)OSType;} + {_oSSku = If( json?.PropertyT("osSku"), out var __jsonOSSku) ? (string)__jsonOSSku : (string)OSSku;} {_vMSize = If( json?.PropertyT("vmSize"), out var __jsonVMSize) ? (string)__jsonVMSize : (string)VMSize;} - {_oSDiskSizeGb = If( json?.PropertyT("osDiskSizeGB"), out var __jsonOSDiskSizeGb) ? (int?)__jsonOSDiskSizeGb : OSDiskSizeGb;} - {_vnetSubnetId = If( json?.PropertyT("vnetSubnetID"), out var __jsonVnetSubnetId) ? (string)__jsonVnetSubnetId : (string)VnetSubnetId;} - {_firstConsecutiveStaticIP = If( json?.PropertyT("firstConsecutiveStaticIP"), out var __jsonFirstConsecutiveStaticIP) ? (string)__jsonFirstConsecutiveStaticIP : (string)FirstConsecutiveStaticIP;} - {_storageProfile = If( json?.PropertyT("storageProfile"), out var __jsonStorageProfile) ? (string)__jsonStorageProfile : (string)StorageProfile;} - {_fqdn = If( json?.PropertyT("fqdn"), out var __jsonFqdn) ? (string)__jsonFqdn : (string)Fqdn;} + {_enableFips = If( json?.PropertyT("enableFIPS"), out var __jsonEnableFips) ? (bool?)__jsonEnableFips : EnableFips;} AfterFromJson(json); } /// - /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfile. - /// - /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfile. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IContainerServiceMasterProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) - { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ContainerServiceMasterProfile(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) { @@ -107,16 +107,31 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - 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._dnsPrefix)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._dnsPrefix.ToString()) : null, "dnsPrefix" ,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._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._firstConsecutiveStaticIP)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._firstConsecutiveStaticIP.ToString()) : null, "firstConsecutiveStaticIP" ,container.Add ); - AddIf( null != (((object)this._storageProfile)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._storageProfile.ToString()) : null, "storageProfile" ,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 != (((object)this._snapshotType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._snapshotType.ToString()) : null, "snapshotType" ,container.Add ); + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._kubernetesVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._kubernetesVersion.ToString()) : null, "kubernetesVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != (((object)this._nodeImageVersion)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._nodeImageVersion.ToString()) : null, "nodeImageVersion" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + 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 ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + 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 ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + 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 ); + } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) { - AddIf( null != (((object)this._fqdn)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._fqdn.ToString()) : null, "fqdn" ,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 ); } AfterToJson(ref container); return container; diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.PowerShell.cs similarity index 85% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.PowerShell.cs index 077bdf78c6fc..49a69a52b06d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class SubResource partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.ISubResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new SubResource(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.Api20200901.ISubResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new SubResource(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubReso /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResource FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource 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. @@ -103,21 +103,21 @@ internal SubResource(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type, 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. @@ -132,15 +132,15 @@ internal SubResource(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Id")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Id, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Id, global::System.Convert.ToString); } if (content.Contains("Name")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Name, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Name, global::System.Convert.ToString); } if (content.Contains("Type")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal)this).Type, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal)this).Type, global::System.Convert.ToString); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.TypeConverter.cs index 5a61806667f1..6d0d50776b34 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.cs similarity index 91% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.cs index 6e8b2ba086d7..553f02506be0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Reference to another subresource. public partial class SubResource : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResource, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal { /// Backing field for property. @@ -21,13 +21,13 @@ public partial class SubResource : public string Id { get => this._id; } /// Internal Acessors for Id - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal.Id { get => this._id; set { {_id = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal.Id { get => this._id; set { {_id = value;} } } /// Internal Acessors for Name - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal.Name { get => this._name; set { {_name = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal.Name { get => this._name; set { {_name = value;} } } /// Internal Acessors for Type - string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResourceInternal.Type { get => this._type; set { {_type = value;} } } + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResourceInternal.Type { get => this._type; set { {_type = value;} } } /// Backing field for property. private string _name; diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.json.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.json.cs index f8cc35ab9d26..6dd7c2ed8055 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/SubResource.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SubResource.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class SubResource 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.Api20200901.ISubResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResource. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ISubResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISubResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new SubResource(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.PowerShell.cs new file mode 100644 index 000000000000..9c09dcee384b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.PowerShell.cs @@ -0,0 +1,360 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Sysctl settings for Linux agent nodes. + [System.ComponentModel.TypeConverter(typeof(SysctlConfigTypeConverter))] + public partial class SysctlConfig + { + + /// + /// 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); + + /// + /// 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.Api20230201.ISysctlConfig DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SysctlConfig(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.Api20230201.ISysctlConfig DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SysctlConfig(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.Api20230201.ISysctlConfig 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 SysctlConfig(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NetCoreSomaxconn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreSomaxconn = (int?) content.GetValueForProperty("NetCoreSomaxconn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreSomaxconn, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreNetdevMaxBacklog")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreNetdevMaxBacklog = (int?) content.GetValueForProperty("NetCoreNetdevMaxBacklog",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreNetdevMaxBacklog, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreRmemDefault")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreRmemDefault = (int?) content.GetValueForProperty("NetCoreRmemDefault",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreRmemDefault, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreRmemMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreRmemMax = (int?) content.GetValueForProperty("NetCoreRmemMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreRmemMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreWmemDefault")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreWmemDefault = (int?) content.GetValueForProperty("NetCoreWmemDefault",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreWmemDefault, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreWmemMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreWmemMax = (int?) content.GetValueForProperty("NetCoreWmemMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreWmemMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreOptmemMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreOptmemMax = (int?) content.GetValueForProperty("NetCoreOptmemMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreOptmemMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpMaxSynBacklog")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpMaxSynBacklog = (int?) content.GetValueForProperty("NetIpv4TcpMaxSynBacklog",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpMaxSynBacklog, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpMaxTwBucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpMaxTwBucket = (int?) content.GetValueForProperty("NetIpv4TcpMaxTwBucket",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpMaxTwBucket, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpFinTimeout")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpFinTimeout = (int?) content.GetValueForProperty("NetIpv4TcpFinTimeout",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpFinTimeout, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpKeepaliveTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpKeepaliveTime = (int?) content.GetValueForProperty("NetIpv4TcpKeepaliveTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpKeepaliveTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpKeepaliveProbe")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpKeepaliveProbe = (int?) content.GetValueForProperty("NetIpv4TcpKeepaliveProbe",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpKeepaliveProbe, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpkeepaliveIntvl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpkeepaliveIntvl = (int?) content.GetValueForProperty("NetIpv4TcpkeepaliveIntvl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpkeepaliveIntvl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpTwReuse")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpTwReuse = (bool?) content.GetValueForProperty("NetIpv4TcpTwReuse",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpTwReuse, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NetIpv4IPLocalPortRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4IPLocalPortRange = (string) content.GetValueForProperty("NetIpv4IPLocalPortRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4IPLocalPortRange, global::System.Convert.ToString); + } + if (content.Contains("NetIpv4NeighDefaultGcThresh1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh1 = (int?) content.GetValueForProperty("NetIpv4NeighDefaultGcThresh1",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh1, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4NeighDefaultGcThresh2")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh2 = (int?) content.GetValueForProperty("NetIpv4NeighDefaultGcThresh2",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh2, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4NeighDefaultGcThresh3")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh3 = (int?) content.GetValueForProperty("NetIpv4NeighDefaultGcThresh3",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh3, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetNetfilterNfConntrackMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetNetfilterNfConntrackMax = (int?) content.GetValueForProperty("NetNetfilterNfConntrackMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetNetfilterNfConntrackMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetNetfilterNfConntrackBucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetNetfilterNfConntrackBucket = (int?) content.GetValueForProperty("NetNetfilterNfConntrackBucket",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetNetfilterNfConntrackBucket, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FsInotifyMaxUserWatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsInotifyMaxUserWatch = (int?) content.GetValueForProperty("FsInotifyMaxUserWatch",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsInotifyMaxUserWatch, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FsFileMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsFileMax = (int?) content.GetValueForProperty("FsFileMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsFileMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FsAioMaxNr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsAioMaxNr = (int?) content.GetValueForProperty("FsAioMaxNr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsAioMaxNr, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FsNrOpen")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsNrOpen = (int?) content.GetValueForProperty("FsNrOpen",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsNrOpen, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KernelThreadsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).KernelThreadsMax = (int?) content.GetValueForProperty("KernelThreadsMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).KernelThreadsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMMaxMapCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMMaxMapCount = (int?) content.GetValueForProperty("VMMaxMapCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMMaxMapCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMSwappiness")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMSwappiness = (int?) content.GetValueForProperty("VMSwappiness",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMSwappiness, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMVfsCachePressure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMVfsCachePressure = (int?) content.GetValueForProperty("VMVfsCachePressure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMVfsCachePressure, (__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 SysctlConfig(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("NetCoreSomaxconn")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreSomaxconn = (int?) content.GetValueForProperty("NetCoreSomaxconn",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreSomaxconn, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreNetdevMaxBacklog")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreNetdevMaxBacklog = (int?) content.GetValueForProperty("NetCoreNetdevMaxBacklog",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreNetdevMaxBacklog, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreRmemDefault")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreRmemDefault = (int?) content.GetValueForProperty("NetCoreRmemDefault",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreRmemDefault, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreRmemMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreRmemMax = (int?) content.GetValueForProperty("NetCoreRmemMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreRmemMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreWmemDefault")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreWmemDefault = (int?) content.GetValueForProperty("NetCoreWmemDefault",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreWmemDefault, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreWmemMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreWmemMax = (int?) content.GetValueForProperty("NetCoreWmemMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreWmemMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetCoreOptmemMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreOptmemMax = (int?) content.GetValueForProperty("NetCoreOptmemMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetCoreOptmemMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpMaxSynBacklog")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpMaxSynBacklog = (int?) content.GetValueForProperty("NetIpv4TcpMaxSynBacklog",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpMaxSynBacklog, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpMaxTwBucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpMaxTwBucket = (int?) content.GetValueForProperty("NetIpv4TcpMaxTwBucket",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpMaxTwBucket, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpFinTimeout")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpFinTimeout = (int?) content.GetValueForProperty("NetIpv4TcpFinTimeout",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpFinTimeout, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpKeepaliveTime")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpKeepaliveTime = (int?) content.GetValueForProperty("NetIpv4TcpKeepaliveTime",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpKeepaliveTime, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpKeepaliveProbe")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpKeepaliveProbe = (int?) content.GetValueForProperty("NetIpv4TcpKeepaliveProbe",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpKeepaliveProbe, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpkeepaliveIntvl")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpkeepaliveIntvl = (int?) content.GetValueForProperty("NetIpv4TcpkeepaliveIntvl",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpkeepaliveIntvl, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4TcpTwReuse")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpTwReuse = (bool?) content.GetValueForProperty("NetIpv4TcpTwReuse",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4TcpTwReuse, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); + } + if (content.Contains("NetIpv4IPLocalPortRange")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4IPLocalPortRange = (string) content.GetValueForProperty("NetIpv4IPLocalPortRange",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4IPLocalPortRange, global::System.Convert.ToString); + } + if (content.Contains("NetIpv4NeighDefaultGcThresh1")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh1 = (int?) content.GetValueForProperty("NetIpv4NeighDefaultGcThresh1",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh1, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4NeighDefaultGcThresh2")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh2 = (int?) content.GetValueForProperty("NetIpv4NeighDefaultGcThresh2",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh2, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetIpv4NeighDefaultGcThresh3")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh3 = (int?) content.GetValueForProperty("NetIpv4NeighDefaultGcThresh3",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetIpv4NeighDefaultGcThresh3, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetNetfilterNfConntrackMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetNetfilterNfConntrackMax = (int?) content.GetValueForProperty("NetNetfilterNfConntrackMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetNetfilterNfConntrackMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("NetNetfilterNfConntrackBucket")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetNetfilterNfConntrackBucket = (int?) content.GetValueForProperty("NetNetfilterNfConntrackBucket",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).NetNetfilterNfConntrackBucket, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FsInotifyMaxUserWatch")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsInotifyMaxUserWatch = (int?) content.GetValueForProperty("FsInotifyMaxUserWatch",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsInotifyMaxUserWatch, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FsFileMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsFileMax = (int?) content.GetValueForProperty("FsFileMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsFileMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FsAioMaxNr")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsAioMaxNr = (int?) content.GetValueForProperty("FsAioMaxNr",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsAioMaxNr, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("FsNrOpen")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsNrOpen = (int?) content.GetValueForProperty("FsNrOpen",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).FsNrOpen, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("KernelThreadsMax")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).KernelThreadsMax = (int?) content.GetValueForProperty("KernelThreadsMax",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).KernelThreadsMax, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMMaxMapCount")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMMaxMapCount = (int?) content.GetValueForProperty("VMMaxMapCount",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMMaxMapCount, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMSwappiness")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMSwappiness = (int?) content.GetValueForProperty("VMSwappiness",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMSwappiness, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int))); + } + if (content.Contains("VMVfsCachePressure")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMVfsCachePressure = (int?) content.GetValueForProperty("VMVfsCachePressure",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal)this).VMVfsCachePressure, (__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(); + } + /// Sysctl settings for Linux agent nodes. + [System.ComponentModel.TypeConverter(typeof(SysctlConfigTypeConverter))] + public partial interface ISysctlConfig + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.TypeConverter.cs new file mode 100644 index 000000000000..56018fd93f4a --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SysctlConfigTypeConverter : 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.Api20230201.ISysctlConfig ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SysctlConfig.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SysctlConfig.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SysctlConfig.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.cs new file mode 100644 index 000000000000..e1bd60fceb9e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.cs @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Sysctl settings for Linux agent nodes. + public partial class SysctlConfig : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfigInternal + { + + /// Backing field for property. + private int? _fsAioMaxNr; + + /// Sysctl setting fs.aio-max-nr. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? FsAioMaxNr { get => this._fsAioMaxNr; set => this._fsAioMaxNr = value; } + + /// Backing field for property. + private int? _fsFileMax; + + /// Sysctl setting fs.file-max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? FsFileMax { get => this._fsFileMax; set => this._fsFileMax = value; } + + /// Backing field for property. + private int? _fsInotifyMaxUserWatch; + + /// Sysctl setting fs.inotify.max_user_watches. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? FsInotifyMaxUserWatch { get => this._fsInotifyMaxUserWatch; set => this._fsInotifyMaxUserWatch = value; } + + /// Backing field for property. + private int? _fsNrOpen; + + /// Sysctl setting fs.nr_open. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? FsNrOpen { get => this._fsNrOpen; set => this._fsNrOpen = value; } + + /// Backing field for property. + private int? _kernelThreadsMax; + + /// Sysctl setting kernel.threads-max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? KernelThreadsMax { get => this._kernelThreadsMax; set => this._kernelThreadsMax = value; } + + /// Backing field for property. + private int? _netCoreNetdevMaxBacklog; + + /// Sysctl setting net.core.netdev_max_backlog. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetCoreNetdevMaxBacklog { get => this._netCoreNetdevMaxBacklog; set => this._netCoreNetdevMaxBacklog = value; } + + /// Backing field for property. + private int? _netCoreOptmemMax; + + /// Sysctl setting net.core.optmem_max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetCoreOptmemMax { get => this._netCoreOptmemMax; set => this._netCoreOptmemMax = value; } + + /// Backing field for property. + private int? _netCoreRmemDefault; + + /// Sysctl setting net.core.rmem_default. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetCoreRmemDefault { get => this._netCoreRmemDefault; set => this._netCoreRmemDefault = value; } + + /// Backing field for property. + private int? _netCoreRmemMax; + + /// Sysctl setting net.core.rmem_max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetCoreRmemMax { get => this._netCoreRmemMax; set => this._netCoreRmemMax = value; } + + /// Backing field for property. + private int? _netCoreSomaxconn; + + /// Sysctl setting net.core.somaxconn. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetCoreSomaxconn { get => this._netCoreSomaxconn; set => this._netCoreSomaxconn = value; } + + /// Backing field for property. + private int? _netCoreWmemDefault; + + /// Sysctl setting net.core.wmem_default. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetCoreWmemDefault { get => this._netCoreWmemDefault; set => this._netCoreWmemDefault = value; } + + /// Backing field for property. + private int? _netCoreWmemMax; + + /// Sysctl setting net.core.wmem_max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetCoreWmemMax { get => this._netCoreWmemMax; set => this._netCoreWmemMax = value; } + + /// Backing field for property. + private string _netIpv4IPLocalPortRange; + + /// Sysctl setting net.ipv4.ip_local_port_range. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string NetIpv4IPLocalPortRange { get => this._netIpv4IPLocalPortRange; set => this._netIpv4IPLocalPortRange = value; } + + /// Backing field for property. + private int? _netIpv4NeighDefaultGcThresh1; + + /// Sysctl setting net.ipv4.neigh.default.gc_thresh1. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetIpv4NeighDefaultGcThresh1 { get => this._netIpv4NeighDefaultGcThresh1; set => this._netIpv4NeighDefaultGcThresh1 = value; } + + /// Backing field for property. + private int? _netIpv4NeighDefaultGcThresh2; + + /// Sysctl setting net.ipv4.neigh.default.gc_thresh2. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetIpv4NeighDefaultGcThresh2 { get => this._netIpv4NeighDefaultGcThresh2; set => this._netIpv4NeighDefaultGcThresh2 = value; } + + /// Backing field for property. + private int? _netIpv4NeighDefaultGcThresh3; + + /// Sysctl setting net.ipv4.neigh.default.gc_thresh3. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetIpv4NeighDefaultGcThresh3 { get => this._netIpv4NeighDefaultGcThresh3; set => this._netIpv4NeighDefaultGcThresh3 = value; } + + /// Backing field for property. + private int? _netIpv4TcpFinTimeout; + + /// Sysctl setting net.ipv4.tcp_fin_timeout. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetIpv4TcpFinTimeout { get => this._netIpv4TcpFinTimeout; set => this._netIpv4TcpFinTimeout = value; } + + /// Backing field for property. + private int? _netIpv4TcpKeepaliveProbe; + + /// Sysctl setting net.ipv4.tcp_keepalive_probes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetIpv4TcpKeepaliveProbe { get => this._netIpv4TcpKeepaliveProbe; set => this._netIpv4TcpKeepaliveProbe = value; } + + /// Backing field for property. + private int? _netIpv4TcpKeepaliveTime; + + /// Sysctl setting net.ipv4.tcp_keepalive_time. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetIpv4TcpKeepaliveTime { get => this._netIpv4TcpKeepaliveTime; set => this._netIpv4TcpKeepaliveTime = value; } + + /// Backing field for property. + private int? _netIpv4TcpMaxSynBacklog; + + /// Sysctl setting net.ipv4.tcp_max_syn_backlog. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetIpv4TcpMaxSynBacklog { get => this._netIpv4TcpMaxSynBacklog; set => this._netIpv4TcpMaxSynBacklog = value; } + + /// Backing field for property. + private int? _netIpv4TcpMaxTwBucket; + + /// Sysctl setting net.ipv4.tcp_max_tw_buckets. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetIpv4TcpMaxTwBucket { get => this._netIpv4TcpMaxTwBucket; set => this._netIpv4TcpMaxTwBucket = value; } + + /// Backing field for property. + private bool? _netIpv4TcpTwReuse; + + /// Sysctl setting net.ipv4.tcp_tw_reuse. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public bool? NetIpv4TcpTwReuse { get => this._netIpv4TcpTwReuse; set => this._netIpv4TcpTwReuse = value; } + + /// Backing field for property. + private int? _netIpv4TcpkeepaliveIntvl; + + /// Sysctl setting net.ipv4.tcp_keepalive_intvl. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetIpv4TcpkeepaliveIntvl { get => this._netIpv4TcpkeepaliveIntvl; set => this._netIpv4TcpkeepaliveIntvl = value; } + + /// Backing field for property. + private int? _netNetfilterNfConntrackBucket; + + /// Sysctl setting net.netfilter.nf_conntrack_buckets. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetNetfilterNfConntrackBucket { get => this._netNetfilterNfConntrackBucket; set => this._netNetfilterNfConntrackBucket = value; } + + /// Backing field for property. + private int? _netNetfilterNfConntrackMax; + + /// Sysctl setting net.netfilter.nf_conntrack_max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? NetNetfilterNfConntrackMax { get => this._netNetfilterNfConntrackMax; set => this._netNetfilterNfConntrackMax = value; } + + /// Backing field for property. + private int? _vMMaxMapCount; + + /// Sysctl setting vm.max_map_count. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? VMMaxMapCount { get => this._vMMaxMapCount; set => this._vMMaxMapCount = value; } + + /// Backing field for property. + private int? _vMSwappiness; + + /// Sysctl setting vm.swappiness. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? VMSwappiness { get => this._vMSwappiness; set => this._vMSwappiness = value; } + + /// Backing field for property. + private int? _vMVfsCachePressure; + + /// Sysctl setting vm.vfs_cache_pressure. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int? VMVfsCachePressure { get => this._vMVfsCachePressure; set => this._vMVfsCachePressure = value; } + + /// Creates an new instance. + public SysctlConfig() + { + + } + } + /// Sysctl settings for Linux agent nodes. + public partial interface ISysctlConfig : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// Sysctl setting fs.aio-max-nr. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting fs.aio-max-nr.", + SerializedName = @"fsAioMaxNr", + PossibleTypes = new [] { typeof(int) })] + int? FsAioMaxNr { get; set; } + /// Sysctl setting fs.file-max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting fs.file-max.", + SerializedName = @"fsFileMax", + PossibleTypes = new [] { typeof(int) })] + int? FsFileMax { get; set; } + /// Sysctl setting fs.inotify.max_user_watches. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting fs.inotify.max_user_watches.", + SerializedName = @"fsInotifyMaxUserWatches", + PossibleTypes = new [] { typeof(int) })] + int? FsInotifyMaxUserWatch { get; set; } + /// Sysctl setting fs.nr_open. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting fs.nr_open.", + SerializedName = @"fsNrOpen", + PossibleTypes = new [] { typeof(int) })] + int? FsNrOpen { get; set; } + /// Sysctl setting kernel.threads-max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting kernel.threads-max.", + SerializedName = @"kernelThreadsMax", + PossibleTypes = new [] { typeof(int) })] + int? KernelThreadsMax { get; set; } + /// Sysctl setting net.core.netdev_max_backlog. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.core.netdev_max_backlog.", + SerializedName = @"netCoreNetdevMaxBacklog", + PossibleTypes = new [] { typeof(int) })] + int? NetCoreNetdevMaxBacklog { get; set; } + /// Sysctl setting net.core.optmem_max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.core.optmem_max.", + SerializedName = @"netCoreOptmemMax", + PossibleTypes = new [] { typeof(int) })] + int? NetCoreOptmemMax { get; set; } + /// Sysctl setting net.core.rmem_default. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.core.rmem_default.", + SerializedName = @"netCoreRmemDefault", + PossibleTypes = new [] { typeof(int) })] + int? NetCoreRmemDefault { get; set; } + /// Sysctl setting net.core.rmem_max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.core.rmem_max.", + SerializedName = @"netCoreRmemMax", + PossibleTypes = new [] { typeof(int) })] + int? NetCoreRmemMax { get; set; } + /// Sysctl setting net.core.somaxconn. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.core.somaxconn.", + SerializedName = @"netCoreSomaxconn", + PossibleTypes = new [] { typeof(int) })] + int? NetCoreSomaxconn { get; set; } + /// Sysctl setting net.core.wmem_default. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.core.wmem_default.", + SerializedName = @"netCoreWmemDefault", + PossibleTypes = new [] { typeof(int) })] + int? NetCoreWmemDefault { get; set; } + /// Sysctl setting net.core.wmem_max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.core.wmem_max.", + SerializedName = @"netCoreWmemMax", + PossibleTypes = new [] { typeof(int) })] + int? NetCoreWmemMax { get; set; } + /// Sysctl setting net.ipv4.ip_local_port_range. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.ip_local_port_range.", + SerializedName = @"netIpv4IpLocalPortRange", + PossibleTypes = new [] { typeof(string) })] + string NetIpv4IPLocalPortRange { get; set; } + /// Sysctl setting net.ipv4.neigh.default.gc_thresh1. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.neigh.default.gc_thresh1.", + SerializedName = @"netIpv4NeighDefaultGcThresh1", + PossibleTypes = new [] { typeof(int) })] + int? NetIpv4NeighDefaultGcThresh1 { get; set; } + /// Sysctl setting net.ipv4.neigh.default.gc_thresh2. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.neigh.default.gc_thresh2.", + SerializedName = @"netIpv4NeighDefaultGcThresh2", + PossibleTypes = new [] { typeof(int) })] + int? NetIpv4NeighDefaultGcThresh2 { get; set; } + /// Sysctl setting net.ipv4.neigh.default.gc_thresh3. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.neigh.default.gc_thresh3.", + SerializedName = @"netIpv4NeighDefaultGcThresh3", + PossibleTypes = new [] { typeof(int) })] + int? NetIpv4NeighDefaultGcThresh3 { get; set; } + /// Sysctl setting net.ipv4.tcp_fin_timeout. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.tcp_fin_timeout.", + SerializedName = @"netIpv4TcpFinTimeout", + PossibleTypes = new [] { typeof(int) })] + int? NetIpv4TcpFinTimeout { get; set; } + /// Sysctl setting net.ipv4.tcp_keepalive_probes. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.tcp_keepalive_probes.", + SerializedName = @"netIpv4TcpKeepaliveProbes", + PossibleTypes = new [] { typeof(int) })] + int? NetIpv4TcpKeepaliveProbe { get; set; } + /// Sysctl setting net.ipv4.tcp_keepalive_time. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.tcp_keepalive_time.", + SerializedName = @"netIpv4TcpKeepaliveTime", + PossibleTypes = new [] { typeof(int) })] + int? NetIpv4TcpKeepaliveTime { get; set; } + /// Sysctl setting net.ipv4.tcp_max_syn_backlog. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.tcp_max_syn_backlog.", + SerializedName = @"netIpv4TcpMaxSynBacklog", + PossibleTypes = new [] { typeof(int) })] + int? NetIpv4TcpMaxSynBacklog { get; set; } + /// Sysctl setting net.ipv4.tcp_max_tw_buckets. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.tcp_max_tw_buckets.", + SerializedName = @"netIpv4TcpMaxTwBuckets", + PossibleTypes = new [] { typeof(int) })] + int? NetIpv4TcpMaxTwBucket { get; set; } + /// Sysctl setting net.ipv4.tcp_tw_reuse. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.tcp_tw_reuse.", + SerializedName = @"netIpv4TcpTwReuse", + PossibleTypes = new [] { typeof(bool) })] + bool? NetIpv4TcpTwReuse { get; set; } + /// Sysctl setting net.ipv4.tcp_keepalive_intvl. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.ipv4.tcp_keepalive_intvl.", + SerializedName = @"netIpv4TcpkeepaliveIntvl", + PossibleTypes = new [] { typeof(int) })] + int? NetIpv4TcpkeepaliveIntvl { get; set; } + /// Sysctl setting net.netfilter.nf_conntrack_buckets. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.netfilter.nf_conntrack_buckets.", + SerializedName = @"netNetfilterNfConntrackBuckets", + PossibleTypes = new [] { typeof(int) })] + int? NetNetfilterNfConntrackBucket { get; set; } + /// Sysctl setting net.netfilter.nf_conntrack_max. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting net.netfilter.nf_conntrack_max.", + SerializedName = @"netNetfilterNfConntrackMax", + PossibleTypes = new [] { typeof(int) })] + int? NetNetfilterNfConntrackMax { get; set; } + /// Sysctl setting vm.max_map_count. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting vm.max_map_count.", + SerializedName = @"vmMaxMapCount", + PossibleTypes = new [] { typeof(int) })] + int? VMMaxMapCount { get; set; } + /// Sysctl setting vm.swappiness. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting vm.swappiness.", + SerializedName = @"vmSwappiness", + PossibleTypes = new [] { typeof(int) })] + int? VMSwappiness { get; set; } + /// Sysctl setting vm.vfs_cache_pressure. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Sysctl setting vm.vfs_cache_pressure.", + SerializedName = @"vmVfsCachePressure", + PossibleTypes = new [] { typeof(int) })] + int? VMVfsCachePressure { get; set; } + + } + /// Sysctl settings for Linux agent nodes. + internal partial interface ISysctlConfigInternal + + { + /// Sysctl setting fs.aio-max-nr. + int? FsAioMaxNr { get; set; } + /// Sysctl setting fs.file-max. + int? FsFileMax { get; set; } + /// Sysctl setting fs.inotify.max_user_watches. + int? FsInotifyMaxUserWatch { get; set; } + /// Sysctl setting fs.nr_open. + int? FsNrOpen { get; set; } + /// Sysctl setting kernel.threads-max. + int? KernelThreadsMax { get; set; } + /// Sysctl setting net.core.netdev_max_backlog. + int? NetCoreNetdevMaxBacklog { get; set; } + /// Sysctl setting net.core.optmem_max. + int? NetCoreOptmemMax { get; set; } + /// Sysctl setting net.core.rmem_default. + int? NetCoreRmemDefault { get; set; } + /// Sysctl setting net.core.rmem_max. + int? NetCoreRmemMax { get; set; } + /// Sysctl setting net.core.somaxconn. + int? NetCoreSomaxconn { get; set; } + /// Sysctl setting net.core.wmem_default. + int? NetCoreWmemDefault { get; set; } + /// Sysctl setting net.core.wmem_max. + int? NetCoreWmemMax { get; set; } + /// Sysctl setting net.ipv4.ip_local_port_range. + string NetIpv4IPLocalPortRange { get; set; } + /// Sysctl setting net.ipv4.neigh.default.gc_thresh1. + int? NetIpv4NeighDefaultGcThresh1 { get; set; } + /// Sysctl setting net.ipv4.neigh.default.gc_thresh2. + int? NetIpv4NeighDefaultGcThresh2 { get; set; } + /// Sysctl setting net.ipv4.neigh.default.gc_thresh3. + int? NetIpv4NeighDefaultGcThresh3 { get; set; } + /// Sysctl setting net.ipv4.tcp_fin_timeout. + int? NetIpv4TcpFinTimeout { get; set; } + /// Sysctl setting net.ipv4.tcp_keepalive_probes. + int? NetIpv4TcpKeepaliveProbe { get; set; } + /// Sysctl setting net.ipv4.tcp_keepalive_time. + int? NetIpv4TcpKeepaliveTime { get; set; } + /// Sysctl setting net.ipv4.tcp_max_syn_backlog. + int? NetIpv4TcpMaxSynBacklog { get; set; } + /// Sysctl setting net.ipv4.tcp_max_tw_buckets. + int? NetIpv4TcpMaxTwBucket { get; set; } + /// Sysctl setting net.ipv4.tcp_tw_reuse. + bool? NetIpv4TcpTwReuse { get; set; } + /// Sysctl setting net.ipv4.tcp_keepalive_intvl. + int? NetIpv4TcpkeepaliveIntvl { get; set; } + /// Sysctl setting net.netfilter.nf_conntrack_buckets. + int? NetNetfilterNfConntrackBucket { get; set; } + /// Sysctl setting net.netfilter.nf_conntrack_max. + int? NetNetfilterNfConntrackMax { get; set; } + /// Sysctl setting vm.max_map_count. + int? VMMaxMapCount { get; set; } + /// Sysctl setting vm.swappiness. + int? VMSwappiness { get; set; } + /// Sysctl setting vm.vfs_cache_pressure. + int? VMVfsCachePressure { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.json.cs new file mode 100644 index 000000000000..ae448f417cf3 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/SysctlConfig.json.cs @@ -0,0 +1,162 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Sysctl settings for Linux agent nodes. + public partial class SysctlConfig + { + + /// + /// 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.Api20230201.ISysctlConfig. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISysctlConfig FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new SysctlConfig(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 SysctlConfig(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_netCoreSomaxconn = If( json?.PropertyT("netCoreSomaxconn"), out var __jsonNetCoreSomaxconn) ? (int?)__jsonNetCoreSomaxconn : NetCoreSomaxconn;} + {_netCoreNetdevMaxBacklog = If( json?.PropertyT("netCoreNetdevMaxBacklog"), out var __jsonNetCoreNetdevMaxBacklog) ? (int?)__jsonNetCoreNetdevMaxBacklog : NetCoreNetdevMaxBacklog;} + {_netCoreRmemDefault = If( json?.PropertyT("netCoreRmemDefault"), out var __jsonNetCoreRmemDefault) ? (int?)__jsonNetCoreRmemDefault : NetCoreRmemDefault;} + {_netCoreRmemMax = If( json?.PropertyT("netCoreRmemMax"), out var __jsonNetCoreRmemMax) ? (int?)__jsonNetCoreRmemMax : NetCoreRmemMax;} + {_netCoreWmemDefault = If( json?.PropertyT("netCoreWmemDefault"), out var __jsonNetCoreWmemDefault) ? (int?)__jsonNetCoreWmemDefault : NetCoreWmemDefault;} + {_netCoreWmemMax = If( json?.PropertyT("netCoreWmemMax"), out var __jsonNetCoreWmemMax) ? (int?)__jsonNetCoreWmemMax : NetCoreWmemMax;} + {_netCoreOptmemMax = If( json?.PropertyT("netCoreOptmemMax"), out var __jsonNetCoreOptmemMax) ? (int?)__jsonNetCoreOptmemMax : NetCoreOptmemMax;} + {_netIpv4TcpMaxSynBacklog = If( json?.PropertyT("netIpv4TcpMaxSynBacklog"), out var __jsonNetIpv4TcpMaxSynBacklog) ? (int?)__jsonNetIpv4TcpMaxSynBacklog : NetIpv4TcpMaxSynBacklog;} + {_netIpv4TcpMaxTwBucket = If( json?.PropertyT("netIpv4TcpMaxTwBuckets"), out var __jsonNetIpv4TcpMaxTwBuckets) ? (int?)__jsonNetIpv4TcpMaxTwBuckets : NetIpv4TcpMaxTwBucket;} + {_netIpv4TcpFinTimeout = If( json?.PropertyT("netIpv4TcpFinTimeout"), out var __jsonNetIpv4TcpFinTimeout) ? (int?)__jsonNetIpv4TcpFinTimeout : NetIpv4TcpFinTimeout;} + {_netIpv4TcpKeepaliveTime = If( json?.PropertyT("netIpv4TcpKeepaliveTime"), out var __jsonNetIpv4TcpKeepaliveTime) ? (int?)__jsonNetIpv4TcpKeepaliveTime : NetIpv4TcpKeepaliveTime;} + {_netIpv4TcpKeepaliveProbe = If( json?.PropertyT("netIpv4TcpKeepaliveProbes"), out var __jsonNetIpv4TcpKeepaliveProbes) ? (int?)__jsonNetIpv4TcpKeepaliveProbes : NetIpv4TcpKeepaliveProbe;} + {_netIpv4TcpkeepaliveIntvl = If( json?.PropertyT("netIpv4TcpkeepaliveIntvl"), out var __jsonNetIpv4TcpkeepaliveIntvl) ? (int?)__jsonNetIpv4TcpkeepaliveIntvl : NetIpv4TcpkeepaliveIntvl;} + {_netIpv4TcpTwReuse = If( json?.PropertyT("netIpv4TcpTwReuse"), out var __jsonNetIpv4TcpTwReuse) ? (bool?)__jsonNetIpv4TcpTwReuse : NetIpv4TcpTwReuse;} + {_netIpv4IPLocalPortRange = If( json?.PropertyT("netIpv4IpLocalPortRange"), out var __jsonNetIpv4IPLocalPortRange) ? (string)__jsonNetIpv4IPLocalPortRange : (string)NetIpv4IPLocalPortRange;} + {_netIpv4NeighDefaultGcThresh1 = If( json?.PropertyT("netIpv4NeighDefaultGcThresh1"), out var __jsonNetIpv4NeighDefaultGcThresh1) ? (int?)__jsonNetIpv4NeighDefaultGcThresh1 : NetIpv4NeighDefaultGcThresh1;} + {_netIpv4NeighDefaultGcThresh2 = If( json?.PropertyT("netIpv4NeighDefaultGcThresh2"), out var __jsonNetIpv4NeighDefaultGcThresh2) ? (int?)__jsonNetIpv4NeighDefaultGcThresh2 : NetIpv4NeighDefaultGcThresh2;} + {_netIpv4NeighDefaultGcThresh3 = If( json?.PropertyT("netIpv4NeighDefaultGcThresh3"), out var __jsonNetIpv4NeighDefaultGcThresh3) ? (int?)__jsonNetIpv4NeighDefaultGcThresh3 : NetIpv4NeighDefaultGcThresh3;} + {_netNetfilterNfConntrackMax = If( json?.PropertyT("netNetfilterNfConntrackMax"), out var __jsonNetNetfilterNfConntrackMax) ? (int?)__jsonNetNetfilterNfConntrackMax : NetNetfilterNfConntrackMax;} + {_netNetfilterNfConntrackBucket = If( json?.PropertyT("netNetfilterNfConntrackBuckets"), out var __jsonNetNetfilterNfConntrackBuckets) ? (int?)__jsonNetNetfilterNfConntrackBuckets : NetNetfilterNfConntrackBucket;} + {_fsInotifyMaxUserWatch = If( json?.PropertyT("fsInotifyMaxUserWatches"), out var __jsonFsInotifyMaxUserWatches) ? (int?)__jsonFsInotifyMaxUserWatches : FsInotifyMaxUserWatch;} + {_fsFileMax = If( json?.PropertyT("fsFileMax"), out var __jsonFsFileMax) ? (int?)__jsonFsFileMax : FsFileMax;} + {_fsAioMaxNr = If( json?.PropertyT("fsAioMaxNr"), out var __jsonFsAioMaxNr) ? (int?)__jsonFsAioMaxNr : FsAioMaxNr;} + {_fsNrOpen = If( json?.PropertyT("fsNrOpen"), out var __jsonFsNrOpen) ? (int?)__jsonFsNrOpen : FsNrOpen;} + {_kernelThreadsMax = If( json?.PropertyT("kernelThreadsMax"), out var __jsonKernelThreadsMax) ? (int?)__jsonKernelThreadsMax : KernelThreadsMax;} + {_vMMaxMapCount = If( json?.PropertyT("vmMaxMapCount"), out var __jsonVMMaxMapCount) ? (int?)__jsonVMMaxMapCount : VMMaxMapCount;} + {_vMSwappiness = If( json?.PropertyT("vmSwappiness"), out var __jsonVMSwappiness) ? (int?)__jsonVMSwappiness : VMSwappiness;} + {_vMVfsCachePressure = If( json?.PropertyT("vmVfsCachePressure"), out var __jsonVMVfsCachePressure) ? (int?)__jsonVMVfsCachePressure : VMVfsCachePressure;} + 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._netCoreSomaxconn ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netCoreSomaxconn) : null, "netCoreSomaxconn" ,container.Add ); + AddIf( null != this._netCoreNetdevMaxBacklog ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netCoreNetdevMaxBacklog) : null, "netCoreNetdevMaxBacklog" ,container.Add ); + AddIf( null != this._netCoreRmemDefault ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netCoreRmemDefault) : null, "netCoreRmemDefault" ,container.Add ); + AddIf( null != this._netCoreRmemMax ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netCoreRmemMax) : null, "netCoreRmemMax" ,container.Add ); + AddIf( null != this._netCoreWmemDefault ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netCoreWmemDefault) : null, "netCoreWmemDefault" ,container.Add ); + AddIf( null != this._netCoreWmemMax ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netCoreWmemMax) : null, "netCoreWmemMax" ,container.Add ); + AddIf( null != this._netCoreOptmemMax ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netCoreOptmemMax) : null, "netCoreOptmemMax" ,container.Add ); + AddIf( null != this._netIpv4TcpMaxSynBacklog ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netIpv4TcpMaxSynBacklog) : null, "netIpv4TcpMaxSynBacklog" ,container.Add ); + AddIf( null != this._netIpv4TcpMaxTwBucket ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netIpv4TcpMaxTwBucket) : null, "netIpv4TcpMaxTwBuckets" ,container.Add ); + AddIf( null != this._netIpv4TcpFinTimeout ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netIpv4TcpFinTimeout) : null, "netIpv4TcpFinTimeout" ,container.Add ); + AddIf( null != this._netIpv4TcpKeepaliveTime ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netIpv4TcpKeepaliveTime) : null, "netIpv4TcpKeepaliveTime" ,container.Add ); + AddIf( null != this._netIpv4TcpKeepaliveProbe ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netIpv4TcpKeepaliveProbe) : null, "netIpv4TcpKeepaliveProbes" ,container.Add ); + AddIf( null != this._netIpv4TcpkeepaliveIntvl ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netIpv4TcpkeepaliveIntvl) : null, "netIpv4TcpkeepaliveIntvl" ,container.Add ); + AddIf( null != this._netIpv4TcpTwReuse ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonBoolean((bool)this._netIpv4TcpTwReuse) : null, "netIpv4TcpTwReuse" ,container.Add ); + AddIf( null != (((object)this._netIpv4IPLocalPortRange)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._netIpv4IPLocalPortRange.ToString()) : null, "netIpv4IpLocalPortRange" ,container.Add ); + AddIf( null != this._netIpv4NeighDefaultGcThresh1 ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netIpv4NeighDefaultGcThresh1) : null, "netIpv4NeighDefaultGcThresh1" ,container.Add ); + AddIf( null != this._netIpv4NeighDefaultGcThresh2 ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netIpv4NeighDefaultGcThresh2) : null, "netIpv4NeighDefaultGcThresh2" ,container.Add ); + AddIf( null != this._netIpv4NeighDefaultGcThresh3 ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netIpv4NeighDefaultGcThresh3) : null, "netIpv4NeighDefaultGcThresh3" ,container.Add ); + AddIf( null != this._netNetfilterNfConntrackMax ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netNetfilterNfConntrackMax) : null, "netNetfilterNfConntrackMax" ,container.Add ); + AddIf( null != this._netNetfilterNfConntrackBucket ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._netNetfilterNfConntrackBucket) : null, "netNetfilterNfConntrackBuckets" ,container.Add ); + AddIf( null != this._fsInotifyMaxUserWatch ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._fsInotifyMaxUserWatch) : null, "fsInotifyMaxUserWatches" ,container.Add ); + AddIf( null != this._fsFileMax ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._fsFileMax) : null, "fsFileMax" ,container.Add ); + AddIf( null != this._fsAioMaxNr ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._fsAioMaxNr) : null, "fsAioMaxNr" ,container.Add ); + AddIf( null != this._fsNrOpen ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._fsNrOpen) : null, "fsNrOpen" ,container.Add ); + AddIf( null != this._kernelThreadsMax ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._kernelThreadsMax) : null, "kernelThreadsMax" ,container.Add ); + AddIf( null != this._vMMaxMapCount ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._vMMaxMapCount) : null, "vmMaxMapCount" ,container.Add ); + AddIf( null != this._vMSwappiness ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._vMSwappiness) : null, "vmSwappiness" ,container.Add ); + AddIf( null != this._vMVfsCachePressure ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber((int)this._vMVfsCachePressure) : null, "vmVfsCachePressure" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.PowerShell.cs similarity index 86% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.PowerShell.cs index 7aa6fe9787d5..e300313cd362 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class TagsObject partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.ITagsObject DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObject DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TagsObject(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.Api20200901.ITagsObject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObject DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TagsObject(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObj /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObject FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObject 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. @@ -103,13 +103,13 @@ internal TagsObject(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.TagsObjectTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TagsObjectTagsTypeConverter.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. @@ -124,7 +124,7 @@ internal TagsObject(global::System.Management.Automation.PSObject content) // actually deserialize if (content.Contains("Tag")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.TagsObjectTagsTypeConverter.ConvertFrom); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TagsObjectTagsTypeConverter.ConvertFrom); } AfterDeserializePSObject(content); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.TypeConverter.cs index 8f2dc4d00452..5491dd57dd96 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObject ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObject ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObject).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObject).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.cs similarity index 76% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.cs index 7103eee81424..bfb9a19ec3fc 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.cs @@ -3,22 +3,22 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Tags object for patch operations. public partial class TagsObject : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObject, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObject, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectInternal { /// Backing field for property. - private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags _tag; + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags _tag; /// Resource tags. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] - public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.TagsObjectTags()); set => this._tag = value; } + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TagsObjectTags()); set => this._tag = value; } /// Creates an new instance. public TagsObject() @@ -36,8 +36,8 @@ public partial interface ITagsObject : ReadOnly = false, Description = @"Resource tags.", SerializedName = @"tags", - PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags) })] - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags Tag { get; set; } + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags Tag { get; set; } } /// Tags object for patch operations. @@ -45,7 +45,7 @@ internal partial interface ITagsObjectInternal { /// Resource tags. - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags Tag { get; set; } + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags Tag { get; set; } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.json.cs similarity index 95% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.json.cs index 40b981399416..e466e0764ff7 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObject.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObject.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TagsObject 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.Api20200901.ITagsObject. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObject. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObject. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObject. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObject FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TagsObject(json) : null; } @@ -77,7 +77,7 @@ internal TagsObject(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObje { return; } - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.TagsObjectTags.FromJson(__jsonTags) : Tag;} + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TagsObjectTags.FromJson(__jsonTags) : Tag;} AfterFromJson(json); } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.PowerShell.cs similarity index 92% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.PowerShell.cs index ea4e8991898b..011db1097020 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.PowerShell.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -55,27 +55,27 @@ public partial class TagsObjectTags partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.ITagsObjectTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new TagsObjectTags(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.Api20200901.ITagsObjectTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new TagsObjectTags(content); } @@ -85,10 +85,10 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObj /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags 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. @@ -107,7 +107,7 @@ internal TagsObjectTags(global::System.Collections.IDictionary content) } /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Management.Automation.PSObject content that should be used. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.TypeConverter.cs index e2e438ce0530..a0edbecf6fec 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.cs similarity index 83% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.cs index eed8ab4e83cb..8c8393123f08 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.cs @@ -3,14 +3,14 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; /// Resource tags. public partial class TagsObjectTags : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTagsInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTagsInternal { /// Creates an new instance. diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.dictionary.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.dictionary.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.dictionary.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.dictionary.cs index 1083e42c9cc2..f61a00c45ac1 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.dictionary.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.dictionary.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.TagsObjectTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TagsObjectTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.json.cs index b2e2d43b7a3c..960d3260cae2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/TagsObjectTags.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TagsObjectTags.json.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; @@ -54,13 +54,13 @@ public partial class TagsObjectTags 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.Api20200901.ITagsObjectTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ITagsObjectTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITagsObjectTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TagsObjectTags(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.PowerShell.cs new file mode 100644 index 000000000000..17f7e5e3cf0a --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Time in a week. + [System.ComponentModel.TypeConverter(typeof(TimeInWeekTypeConverter))] + public partial class TimeInWeek + { + + /// + /// 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); + + /// + /// 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.Api20230201.ITimeInWeek DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TimeInWeek(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.Api20230201.ITimeInWeek DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TimeInWeek(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.Api20230201.ITimeInWeek 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 TimeInWeek(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Day")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeekInternal)this).Day = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay?) content.GetValueForProperty("Day",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeekInternal)this).Day, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay.CreateFrom); + } + if (content.Contains("HourSlot")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeekInternal)this).HourSlot = (int[]) content.GetValueForProperty("HourSlot",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeekInternal)this).HourSlot, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, typeof(int)))); + } + AfterDeserializeDictionary(content); + } + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Management.Automation.PSObject content that should be used. + internal TimeInWeek(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Day")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeekInternal)this).Day = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay?) content.GetValueForProperty("Day",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeekInternal)this).Day, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay.CreateFrom); + } + if (content.Contains("HourSlot")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeekInternal)this).HourSlot = (int[]) content.GetValueForProperty("HourSlot",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeekInternal)this).HourSlot, __y => TypeConverterExtensions.SelectToArray(__y, (__w)=> (int) global::System.Convert.ChangeType(__w, 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(); + } + /// Time in a week. + [System.ComponentModel.TypeConverter(typeof(TimeInWeekTypeConverter))] + public partial interface ITimeInWeek + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.TypeConverter.cs new file mode 100644 index 000000000000..86cf2ada8092 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TimeInWeekTypeConverter : 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.Api20230201.ITimeInWeek ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TimeInWeek.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TimeInWeek.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TimeInWeek.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.cs new file mode 100644 index 000000000000..86263360721f --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Time in a week. + public partial class TimeInWeek : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeekInternal + { + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay? _day; + + /// The day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay? Day { get => this._day; set => this._day = value; } + + /// Backing field for property. + private int[] _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.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public int[] HourSlot { get => this._hourSlot; set => this._hourSlot = value; } + + /// Creates an new instance. + public TimeInWeek() + { + + } + } + /// Time in a week. + public partial interface ITimeInWeek : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The day of the week. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The day of the week.", + SerializedName = @"day", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay? 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. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + 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.", + SerializedName = @"hourSlots", + PossibleTypes = new [] { typeof(int) })] + int[] HourSlot { get; set; } + + } + /// Time in a week. + internal partial interface ITimeInWeekInternal + + { + /// The day of the week. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay? 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. + /// + int[] HourSlot { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.json.cs new file mode 100644 index 000000000000..eb492831442c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeInWeek.json.cs @@ -0,0 +1,118 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Time in a week. + public partial class TimeInWeek + { + + /// + /// 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.Api20230201.ITimeInWeek. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TimeInWeek(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 TimeInWeek(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_day = If( json?.PropertyT("day"), out var __jsonDay) ? (string)__jsonDay : (string)Day;} + {_hourSlot = If( json?.PropertyT("hourSlots"), out var __jsonHourSlots) ? If( __jsonHourSlots as Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonArray, out var __v) ? new global::System.Func(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(int) (__u is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber __t ? (int)__t : default(int))) ))() : null : HourSlot;} + 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._day)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._day.ToString()) : null, "day" ,container.Add ); + if (null != this._hourSlot) + { + var __w = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.XNodeArray(); + foreach( var __x in this._hourSlot ) + { + AddIf((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode)new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNumber(__x) ,__w.Add); + } + container.Add("hourSlots",__w); + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.PowerShell.cs new file mode 100644 index 000000000000..673ae761502c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.PowerShell.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + [System.ComponentModel.TypeConverter(typeof(TimeSpanTypeConverter))] + public partial class TimeSpan + { + + /// + /// 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); + + /// + /// 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.Api20230201.ITimeSpan DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TimeSpan(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.Api20230201.ITimeSpan DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TimeSpan(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.Api20230201.ITimeSpan 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 TimeSpan(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.Api20230201.ITimeSpanInternal)this).Start = (global::System.DateTime?) content.GetValueForProperty("Start",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpanInternal)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.Api20230201.ITimeSpanInternal)this).End = (global::System.DateTime?) content.GetValueForProperty("End",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpanInternal)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 TimeSpan(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.Api20230201.ITimeSpanInternal)this).Start = (global::System.DateTime?) content.GetValueForProperty("Start",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpanInternal)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.Api20230201.ITimeSpanInternal)this).End = (global::System.DateTime?) content.GetValueForProperty("End",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpanInternal)this).End, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + 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(); + } + /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + [System.ComponentModel.TypeConverter(typeof(TimeSpanTypeConverter))] + public partial interface ITimeSpan + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.TypeConverter.cs new file mode 100644 index 000000000000..d926bd8576aa --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TimeSpanTypeConverter : 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.Api20230201.ITimeSpan ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TimeSpan.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TimeSpan.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TimeSpan.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.cs new file mode 100644 index 000000000000..fe4a6cfb7038 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + public partial class TimeSpan : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpanInternal + { + + /// Backing field for property. + private global::System.DateTime? _end; + + /// The end of a time 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 of a time 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 TimeSpan() + { + + } + } + /// 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 + { + /// The end of a time span + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The end of a time span", + SerializedName = @"end", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? End { get; set; } + /// The start of a time span + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The start of a time span", + SerializedName = @"start", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? Start { get; set; } + + } + /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + internal partial interface ITimeSpanInternal + + { + /// The end of a time span + global::System.DateTime? End { get; set; } + /// The start of a time span + global::System.DateTime? Start { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.json.cs new file mode 100644 index 000000000000..83a0f5350b4b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/TimeSpan.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z. + public partial class TimeSpan + { + + /// + /// 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.Api20230201.ITimeSpan. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TimeSpan(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 TimeSpan(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); + } + + /// + /// 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._start ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._start?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "start" ,container.Add ); + AddIf( null != this._end ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._end?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "end" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.PowerShell.cs similarity index 84% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.PowerShell.cs index 1a4acd2f4ad0..66d9cc323e60 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.PowerShell.cs @@ -3,10 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + /// Details about a user assigned identity. [System.ComponentModel.TypeConverter(typeof(UserAssignedIdentityTypeConverter))] public partial class UserAssignedIdentity { @@ -54,27 +55,27 @@ public partial class UserAssignedIdentity partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IUserAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity DeserializeFromDictionary(global::System.Collections.IDictionary content) { return new UserAssignedIdentity(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.Api20200901.IUserAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { return new UserAssignedIdentity(content); } @@ -84,7 +85,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAss /// /// a string containing a JSON serialized instance of this model. /// an instance of the model class. - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode.Parse(jsonText)); /// Serializes this instance to a json string. @@ -92,7 +93,7 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAss public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeAll)?.ToString(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. @@ -107,21 +108,21 @@ internal UserAssignedIdentity(global::System.Collections.IDictionary content) // actually deserialize if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ResourceId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("ObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId = (string) content.GetValueForProperty("ObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ObjectId = (string) content.GetValueForProperty("ObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ObjectId, 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. @@ -136,19 +137,20 @@ internal UserAssignedIdentity(global::System.Management.Automation.PSObject cont // actually deserialize if (content.Contains("ResourceId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ResourceId, global::System.Convert.ToString); } if (content.Contains("ClientId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); } if (content.Contains("ObjectId")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId = (string) content.GetValueForProperty("ObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ObjectId = (string) content.GetValueForProperty("ObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal)this).ObjectId, global::System.Convert.ToString); } AfterDeserializePSObject(content); } } + /// Details about a user assigned identity. [System.ComponentModel.TypeConverter(typeof(UserAssignedIdentityTypeConverter))] public partial interface IUserAssignedIdentity diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.TypeConverter.cs index 91e4506754aa..3952f862cbd4 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -106,14 +106,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.cs similarity index 71% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.cs index 57396285a727..d46225140c51 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.cs @@ -3,33 +3,34 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + /// Details about a user assigned identity. public partial class UserAssignedIdentity : - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity, - Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentityInternal { /// Backing field for property. private string _clientId; - /// The client id of the user assigned identity. + /// The client ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ClientId { get => this._clientId; set => this._clientId = value; } /// Backing field for property. private string _objectId; - /// The object id of the user assigned identity. + /// The object ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ObjectId { get => this._objectId; set => this._objectId = value; } /// Backing field for property. private string _resourceId; - /// The resource id of the user assigned identity. + /// The resource ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] public string ResourceId { get => this._resourceId; set => this._resourceId = value; } @@ -39,43 +40,45 @@ public UserAssignedIdentity() } } + /// Details about a user assigned identity. public partial interface IUserAssignedIdentity : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable { - /// The client id of the user assigned identity. + /// The client ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The client id of the user assigned identity.", + Description = @"The client ID of the user assigned identity.", SerializedName = @"clientId", PossibleTypes = new [] { typeof(string) })] string ClientId { get; set; } - /// The object id of the user assigned identity. + /// The object ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The object id of the user assigned identity.", + Description = @"The object ID of the user assigned identity.", SerializedName = @"objectId", PossibleTypes = new [] { typeof(string) })] string ObjectId { get; set; } - /// The resource id of the user assigned identity. + /// The resource ID of the user assigned identity. [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = false, ReadOnly = false, - Description = @"The resource id of the user assigned identity.", + Description = @"The resource ID of the user assigned identity.", SerializedName = @"resourceId", PossibleTypes = new [] { typeof(string) })] string ResourceId { get; set; } } + /// Details about a user assigned identity. internal partial interface IUserAssignedIdentityInternal { - /// The client id of the user assigned identity. + /// The client ID of the user assigned identity. string ClientId { get; set; } - /// The object id of the user assigned identity. + /// The object ID of the user assigned identity. string ObjectId { get; set; } - /// The resource id of the user assigned identity. + /// The resource ID of the user assigned identity. string ResourceId { get; set; } } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.json.cs similarity index 96% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.json.cs index 1b03fe651a93..95e97cc8a407 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/UserAssignedIdentity.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/UserAssignedIdentity.json.cs @@ -3,10 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + /// Details about a user assigned identity. public partial class UserAssignedIdentity { @@ -53,13 +54,13 @@ public partial class UserAssignedIdentity 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.Api20200901.IUserAssignedIdentity. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IUserAssignedIdentity FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new UserAssignedIdentity(json) : null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.PowerShell.cs similarity index 62% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.PowerShell.cs index 4c0f5c083a3d..7536d28df02c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.PowerShell.cs @@ -3,12 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - [System.ComponentModel.TypeConverter(typeof(ManagedClusterPropertiesIdentityProfileValueTypeConverter))] - public partial class ManagedClusterPropertiesIdentityProfileValue + /// Windows gMSA Profile in the managed cluster. + [System.ComponentModel.TypeConverter(typeof(WindowsGmsaProfileTypeConverter))] + public partial class WindowsGmsaProfile { /// @@ -54,49 +55,49 @@ public partial class ManagedClusterPropertiesIdentityProfileValue partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IManagedClusterPropertiesIdentityProfileValue DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ManagedClusterPropertiesIdentityProfileValue(content); + return new WindowsGmsaProfile(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.Api20200901.IManagedClusterPropertiesIdentityProfileValue DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ManagedClusterPropertiesIdentityProfileValue(content); + return new WindowsGmsaProfile(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.Api20200901.IManagedClusterPropertiesIdentityProfileValue 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.Api20230201.IWindowsGmsaProfile 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(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal ManagedClusterPropertiesIdentityProfileValue(global::System.Collections.IDictionary content) + internal WindowsGmsaProfile(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -105,27 +106,27 @@ internal ManagedClusterPropertiesIdentityProfileValue(global::System.Collections return; } // actually deserialize - if (content.Contains("ResourceId")) + if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("ClientId")) + if (content.Contains("DnsServer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).DnsServer = (string) content.GetValueForProperty("DnsServer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).DnsServer, global::System.Convert.ToString); } - if (content.Contains("ObjectId")) + if (content.Contains("RootDomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId = (string) content.GetValueForProperty("ObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).RootDomainName = (string) content.GetValueForProperty("RootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).RootDomainName, 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 ManagedClusterPropertiesIdentityProfileValue(global::System.Management.Automation.PSObject content) + internal WindowsGmsaProfile(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -134,28 +135,24 @@ internal ManagedClusterPropertiesIdentityProfileValue(global::System.Management. return; } // actually deserialize - if (content.Contains("ResourceId")) + if (content.Contains("Enabled")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId = (string) content.GetValueForProperty("ResourceId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ResourceId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).Enabled = (bool?) content.GetValueForProperty("Enabled",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).Enabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool))); } - if (content.Contains("ClientId")) + if (content.Contains("DnsServer")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId = (string) content.GetValueForProperty("ClientId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ClientId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).DnsServer = (string) content.GetValueForProperty("DnsServer",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).DnsServer, global::System.Convert.ToString); } - if (content.Contains("ObjectId")) + if (content.Contains("RootDomainName")) { - ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId = (string) content.GetValueForProperty("ObjectId",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IUserAssignedIdentityInternal)this).ObjectId, global::System.Convert.ToString); + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).RootDomainName = (string) content.GetValueForProperty("RootDomainName",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal)this).RootDomainName, 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(); } - [System.ComponentModel.TypeConverter(typeof(ManagedClusterPropertiesIdentityProfileValueTypeConverter))] - public partial interface IManagedClusterPropertiesIdentityProfileValue + /// Windows gMSA Profile in the managed cluster. + [System.ComponentModel.TypeConverter(typeof(WindowsGmsaProfileTypeConverter))] + public partial interface IWindowsGmsaProfile { diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.TypeConverter.cs new file mode 100644 index 000000000000..a7631fd87c9c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.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.Api20230201 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class WindowsGmsaProfileTypeConverter : 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.Api20230201.IWindowsGmsaProfile ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return WindowsGmsaProfile.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return WindowsGmsaProfile.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return WindowsGmsaProfile.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/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.cs new file mode 100644 index 000000000000..fa300116d2d3 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Windows gMSA Profile in the managed cluster. + public partial class WindowsGmsaProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfileInternal + { + + /// Backing field for property. + private string _dnsServer; + + /// + /// 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string DnsServer { get => this._dnsServer; set => this._dnsServer = value; } + + /// Backing field for property. + private bool? _enabled; + + /// 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; } + + /// Backing field for property. + private string _rootDomainName; + + /// + /// Specifies the root domain name 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string RootDomainName { get => this._rootDomainName; set => this._rootDomainName = value; } + + /// Creates an new instance. + public WindowsGmsaProfile() + { + + } + } + /// Windows gMSA Profile in the managed cluster. + public partial interface IWindowsGmsaProfile : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// + /// 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. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"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.", + SerializedName = @"dnsServer", + PossibleTypes = new [] { typeof(string) })] + string DnsServer { get; set; } + /// Specifies whether to enable Windows gMSA in the managed cluster. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies whether to enable Windows gMSA in the managed cluster.", + SerializedName = @"enabled", + PossibleTypes = new [] { typeof(bool) })] + 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 + /// vnet which is used to create the managed cluster. + ///
+ [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Specifies the root domain name 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.", + SerializedName = @"rootDomainName", + PossibleTypes = new [] { typeof(string) })] + string RootDomainName { get; set; } + + } + /// Windows gMSA Profile in the managed cluster. + internal partial interface IWindowsGmsaProfileInternal + + { + /// + /// 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 DnsServer { get; set; } + /// 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 + /// vnet which is used to create the managed cluster. + ///
+ string RootDomainName { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.json.cs new file mode 100644 index 000000000000..1996d365e295 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api20230201/WindowsGmsaProfile.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.Api20230201 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Windows gMSA Profile in the managed cluster. + public partial class WindowsGmsaProfile + { + + /// + /// 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.Api20230201.IWindowsGmsaProfile. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IWindowsGmsaProfile FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new WindowsGmsaProfile(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._dnsServer)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._dnsServer.ToString()) : null, "dnsServer" ,container.Add ); + AddIf( null != (((object)this._rootDomainName)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._rootDomainName.ToString()) : null, "rootDomainName" ,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 WindowsGmsaProfile(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;} + {_dnsServer = If( json?.PropertyT("dnsServer"), out var __jsonDnsServer) ? (string)__jsonDnsServer : (string)DnsServer;} + {_rootDomainName = If( json?.PropertyT("rootDomainName"), out var __jsonRootDomainName) ? (string)__jsonRootDomainName : (string)RootDomainName;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.PowerShell.cs new file mode 100644 index 000000000000..c87f9bff9a67 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.PowerShell.cs @@ -0,0 +1,218 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial class Resource + { + + /// + /// 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); + + /// + /// 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.Api30.IResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new Resource(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.Api30.IResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new Resource(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.Api30.IResource 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 Resource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (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 Resource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("SystemData")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + 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(); + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + [System.ComponentModel.TypeConverter(typeof(ResourceTypeConverter))] + public partial interface IResource + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.TypeConverter.cs similarity index 97% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.TypeConverter.cs index d3d9ecc9f8be..29c1b5b81bf3 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.TypeConverter.cs @@ -3,7 +3,7 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; @@ -105,14 +105,14 @@ public static bool CanConvertFrom(dynamic sourceValue) /// /// an instance of , or null if there is no suitable conversion. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResource ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResource ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResource).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResource).IsAssignableFrom(type)) { return sourceValue; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.cs new file mode 100644 index 000000000000..bee1d33bd9b3 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.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.Api30 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// + public partial class Resource : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResource, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal + { + + /// Backing field for property. + private string _id; + + /// + /// Fully qualified resource ID for the resource. Ex - /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; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Id { get => this._id; set { {_id = value;} } } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Name { get => this._name; set { {_name = value;} } } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemData()); set { {_systemData = value;} } } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Type { get => this._type; set { {_type = value;} } } + + /// Backing field for property. + private string _name; + + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Name { get => this._name; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData _systemData; + + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + internal Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData SystemData { get => (this._systemData = this._systemData ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemData()); } + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataCreatedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedAt = value ?? default(global::System.DateTime); } + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string SystemDataCreatedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).CreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public global::System.DateTime? SystemDataLastModifiedAt { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedAt = value ?? default(global::System.DateTime); } + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public string SystemDataLastModifiedBy { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inlined)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)SystemData).LastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// Backing field for property. + private string _type; + + /// + /// 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.Owned)] + public string Type { get => this._type; } + + /// Creates an new instance. + public Resource() + { + + } + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + 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} + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}", + SerializedName = @"id", + PossibleTypes = new [] { typeof(string) })] + string Id { get; } + /// The name of the resource + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The name of the resource", + SerializedName = @"name", + PossibleTypes = new [] { typeof(string) })] + string Name { get; } + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = true, + Description = @"The type of the resource. E.g. ""Microsoft.Compute/virtualMachines"" or ""Microsoft.Storage/storageAccounts""", + SerializedName = @"type", + PossibleTypes = new [] { typeof(string) })] + string Type { get; } + + } + /// Common fields that are returned in the response for all Azure Resource Manager resources + internal partial interface IResourceInternal + + { + /// + /// Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + /// + string Id { get; set; } + /// The name of the resource + string Name { get; set; } + /// + /// Azure Resource Manager metadata containing createdBy and modifiedBy information. + /// + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData SystemData { get; set; } + /// The timestamp of resource creation (UTC). + global::System.DateTime? SystemDataCreatedAt { get; set; } + /// The identity that created the resource. + string SystemDataCreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataCreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? SystemDataLastModifiedAt { get; set; } + /// The identity that last modified the resource. + string SystemDataLastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataLastModifiedByType { get; set; } + /// + /// The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + /// + string Type { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.json.cs similarity index 85% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.json.cs index 71dde941f2be..a823e05e2952 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/Resource.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/Resource.json.cs @@ -3,11 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// The Resource model definition. + /// + /// Common fields that are returned in the response for all Azure Resource Manager resources + /// public partial class Resource { @@ -54,13 +56,11 @@ public partial class Resource 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.Api20200901.IResource. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResource. /// /// a to deserialize from. - /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResource. - /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResource. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new Resource(json) : null; } @@ -77,11 +77,10 @@ internal Resource(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject { return; } + {_systemData = If( json?.PropertyT("systemData"), out var __jsonSystemData) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemData.FromJson(__jsonSystemData) : SystemData;} {_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;} - {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} - {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTags.FromJson(__jsonTags) : Tag;} AfterFromJson(json); } @@ -105,6 +104,10 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro return container; } if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) + { + AddIf( null != this._systemData ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._systemData.ToJson(null,serializationMode) : null, "systemData" ,container.Add ); + } + if (serializationMode.HasFlag(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SerializationMode.IncludeReadOnly)) { 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 ); } @@ -116,8 +119,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { 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 != (((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 ); - AddIf( null != this._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,container.Add ); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.PowerShell.cs new file mode 100644 index 000000000000..7d2b67a6ed25 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.PowerShell.cs @@ -0,0 +1,184 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial class SystemData + { + + /// + /// 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); + + /// + /// 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.Api30.ISystemData DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new SystemData(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.Api30.ISystemData DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new SystemData(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.Api30.ISystemData 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 SystemData(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedAt, (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 SystemData(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("CreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedBy = (string) content.GetValueForProperty("CreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedBy, global::System.Convert.ToString); + } + if (content.Contains("CreatedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("CreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("CreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedAt = (global::System.DateTime?) content.GetValueForProperty("CreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).CreatedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + if (content.Contains("LastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedBy = (string) content.GetValueForProperty("LastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("LastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("LastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("LastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("LastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal)this).LastModifiedAt, (v) => v is global::System.DateTime _v ? _v : global::System.Xml.XmlConvert.ToDateTime( v.ToString() , global::System.Xml.XmlDateTimeSerializationMode.Unspecified)); + } + 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(); + } + /// Metadata pertaining to creation and last modification of the resource. + [System.ComponentModel.TypeConverter(typeof(SystemDataTypeConverter))] + public partial interface ISystemData + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.TypeConverter.cs new file mode 100644 index 000000000000..1630a62393bc --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.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.Api30 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class SystemDataTypeConverter : 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.Api30.ISystemData ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return SystemData.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return SystemData.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return SystemData.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/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.cs new file mode 100644 index 000000000000..9228f11fbe56 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.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.Api30 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemDataInternal + { + + /// Backing field for property. + private global::System.DateTime? _createdAt; + + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public global::System.DateTime? CreatedAt { get => this._createdAt; set => this._createdAt = value; } + + /// Backing field for property. + private string _createdBy; + + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string CreatedBy { get => this._createdBy; set => this._createdBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? _createdByType; + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? CreatedByType { get => this._createdByType; set => this._createdByType = value; } + + /// Backing field for property. + private global::System.DateTime? _lastModifiedAt; + + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public global::System.DateTime? LastModifiedAt { get => this._lastModifiedAt; set => this._lastModifiedAt = value; } + + /// Backing field for property. + private string _lastModifiedBy; + + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string LastModifiedBy { get => this._lastModifiedBy; set => this._lastModifiedBy = value; } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? _lastModifiedByType; + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? LastModifiedByType { get => this._lastModifiedByType; set => this._lastModifiedByType = value; } + + /// Creates an new instance. + public SystemData() + { + + } + } + /// Metadata pertaining to creation and last modification of the resource. + public partial interface ISystemData : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable + { + /// The timestamp of resource creation (UTC). + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource creation (UTC).", + SerializedName = @"createdAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that created the resource.", + SerializedName = @"createdBy", + PossibleTypes = new [] { typeof(string) })] + string CreatedBy { get; set; } + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that created the resource.", + SerializedName = @"createdByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The timestamp of resource last modification (UTC)", + SerializedName = @"lastModifiedAt", + PossibleTypes = new [] { typeof(global::System.DateTime) })] + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The identity that last modified the resource.", + SerializedName = @"lastModifiedBy", + PossibleTypes = new [] { typeof(string) })] + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"The type of identity that last modified the resource.", + SerializedName = @"lastModifiedByType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? LastModifiedByType { get; set; } + + } + /// Metadata pertaining to creation and last modification of the resource. + internal partial interface ISystemDataInternal + + { + /// The timestamp of resource creation (UTC). + global::System.DateTime? CreatedAt { get; set; } + /// The identity that created the resource. + string CreatedBy { get; set; } + /// The type of identity that created the resource. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? CreatedByType { get; set; } + /// The timestamp of resource last modification (UTC) + global::System.DateTime? LastModifiedAt { get; set; } + /// The identity that last modified the resource. + string LastModifiedBy { get; set; } + /// The type of identity that last modified the resource. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? LastModifiedByType { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.json.cs new file mode 100644 index 000000000000..9cc80f45b7fd --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/SystemData.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.Api30 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Metadata pertaining to creation and last modification of the resource. + public partial class SystemData + { + + /// + /// 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.Api30.ISystemData. + /// + /// a to deserialize from. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new SystemData(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 SystemData(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + {_createdBy = If( json?.PropertyT("createdBy"), out var __jsonCreatedBy) ? (string)__jsonCreatedBy : (string)CreatedBy;} + {_createdByType = If( json?.PropertyT("createdByType"), out var __jsonCreatedByType) ? (string)__jsonCreatedByType : (string)CreatedByType;} + {_createdAt = If( json?.PropertyT("createdAt"), out var __jsonCreatedAt) ? global::System.DateTime.TryParse((string)__jsonCreatedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonCreatedAtValue) ? __jsonCreatedAtValue : CreatedAt : CreatedAt;} + {_lastModifiedBy = If( json?.PropertyT("lastModifiedBy"), out var __jsonLastModifiedBy) ? (string)__jsonLastModifiedBy : (string)LastModifiedBy;} + {_lastModifiedByType = If( json?.PropertyT("lastModifiedByType"), out var __jsonLastModifiedByType) ? (string)__jsonLastModifiedByType : (string)LastModifiedByType;} + {_lastModifiedAt = If( json?.PropertyT("lastModifiedAt"), out var __jsonLastModifiedAt) ? global::System.DateTime.TryParse((string)__jsonLastModifiedAt, global::System.Globalization.CultureInfo.InvariantCulture, global::System.Globalization.DateTimeStyles.AdjustToUniversal, out var __jsonLastModifiedAtValue) ? __jsonLastModifiedAtValue : LastModifiedAt : LastModifiedAt;} + 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._createdBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._createdBy.ToString()) : null, "createdBy" ,container.Add ); + AddIf( null != (((object)this._createdByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._createdByType.ToString()) : null, "createdByType" ,container.Add ); + AddIf( null != this._createdAt ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._createdAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "createdAt" ,container.Add ); + AddIf( null != (((object)this._lastModifiedBy)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._lastModifiedBy.ToString()) : null, "lastModifiedBy" ,container.Add ); + AddIf( null != (((object)this._lastModifiedByType)?.ToString()) ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._lastModifiedByType.ToString()) : null, "lastModifiedByType" ,container.Add ); + AddIf( null != this._lastModifiedAt ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) new Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonString(this._lastModifiedAt?.ToString(@"yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK",global::System.Globalization.CultureInfo.InvariantCulture)) : null, "lastModifiedAt" ,container.Add ); + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.PowerShell.cs new file mode 100644 index 000000000000..d47a777a19bb --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.PowerShell.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial class TrackedResource + { + + /// + /// 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); + + /// + /// 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.Api30.ITrackedResource DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new TrackedResource(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.Api30.ITrackedResource DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new TrackedResource(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.Api30.ITrackedResource 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(); + + /// + /// Deserializes a into a new instance of . + /// + /// The global::System.Collections.IDictionary content that should be used. + internal TrackedResource(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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 TrackedResource(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Tag")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags) content.GetValueForProperty("Tag",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Tag, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTagsTypeConverter.ConvertFrom); + } + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy = (string) content.GetValueForProperty("SystemDataCreatedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataCreatedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataCreatedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemDataCreatedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataCreatedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataCreatedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedBy")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy = (string) content.GetValueForProperty("SystemDataLastModifiedBy",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedBy, global::System.Convert.ToString); + } + if (content.Contains("SystemDataLastModifiedByType")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType?) content.GetValueForProperty("SystemDataLastModifiedByType",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedByType, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType.CreateFrom); + } + if (content.Contains("SystemDataLastModifiedAt")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemDataLastModifiedAt = (global::System.DateTime?) content.GetValueForProperty("SystemDataLastModifiedAt",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.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.Api30.IResourceInternal)this).SystemData = (Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData) content.GetValueForProperty("SystemData",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).SystemData, Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.SystemDataTypeConverter.ConvertFrom); + } + if (content.Contains("Id")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Id, global::System.Convert.ToString); + } + if (content.Contains("Name")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Name, global::System.Convert.ToString); + } + if (content.Contains("Type")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)this).Type, global::System.Convert.ToString); + } + AfterDeserializePSObject(content); + } + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTypeConverter))] + public partial interface ITrackedResource + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.TypeConverter.cs new file mode 100644 index 000000000000..0ec77f11e12d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.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.Api30 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTypeConverter : 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.Api30.ITrackedResource ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResource).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResource.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResource.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResource.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/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.cs new file mode 100644 index 000000000000..c5ecb1b37967 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.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.Api30 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResource, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IValidates + { + /// + /// Backing field for Inherited model + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResource __resource = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.Resource(); + + /// + /// Fully qualified resource ID for the resource. Ex - /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.Api30.IResourceInternal)__resource).Id; } + + /// Backing field for property. + private string _location; + + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// Internal Acessors for Id + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Id { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).Id; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).Id = value; } + + /// Internal Acessors for Name + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Name { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).Name; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).Name = value; } + + /// Internal Acessors for SystemData + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemData; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemData = value; } + + /// Internal Acessors for Type + string Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal.Type { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).Type; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).Type = value; } + + /// 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.Api30.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)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ISystemData SystemData { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemData; } + + /// 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.Api30.IResourceInternal)__resource).SystemDataCreatedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemDataCreatedAt = value ?? default(global::System.DateTime); } + + /// 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.Api30.IResourceInternal)__resource).SystemDataCreatedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemDataCreatedBy = value ?? null; } + + /// The type of identity that created the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataCreatedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemDataCreatedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// 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.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedAt = value ?? default(global::System.DateTime); } + + /// 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.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedBy = value ?? null; } + + /// The type of identity that last modified the resource. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Inherited)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType? SystemDataLastModifiedByType { get => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType; set => ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal)__resource).SystemDataLastModifiedByType = value ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType)""); } + + /// Backing field for property. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags _tag; + + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags Tag { get => (this._tag = this._tag ?? new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTags()); set => this._tag = value; } + + /// + /// 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.Api30.IResourceInternal)__resource).Type; } + + /// Creates an new instance. + public TrackedResource() + { + + } + + /// 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 an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + public partial interface ITrackedResource : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResource + { + /// The geo-location where the resource lives + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + /// Resource tags. + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags) })] + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags Tag { get; set; } + + } + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + internal partial interface ITrackedResourceInternal : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.IResourceInternal + { + /// The geo-location where the resource lives + string Location { get; set; } + /// Resource tags. + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags Tag { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.json.cs new file mode 100644 index 000000000000..a2cdef8ded8e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResource.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.Api30 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// + /// The resource model definition for an Azure Resource Manager tracked top level resource which has 'tags' and a 'location' + /// + public partial class TrackedResource + { + + /// + /// 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.Api30.ITrackedResource. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResource. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResource FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TrackedResource(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._tag ? (Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode) this._tag.ToJson(null,serializationMode) : null, "tags" ,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; + } + + /// + /// 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 TrackedResource(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.Api30.Resource(json); + {_tag = If( json?.PropertyT("tags"), out var __jsonTags) ? Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTags.FromJson(__jsonTags) : Tag;} + {_location = If( json?.PropertyT("location"), out var __jsonLocation) ? (string)__jsonLocation : (string)Location;} + AfterFromJson(json); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.PowerShell.cs similarity index 79% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.PowerShell.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.PowerShell.cs index da9d2d5fb710..0b298e91e979 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.PowerShell.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.PowerShell.cs @@ -3,13 +3,13 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30 { using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; - /// Resource tags - [System.ComponentModel.TypeConverter(typeof(ResourceTagsTypeConverter))] - public partial class ResourceTags + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial class TrackedResourceTags { /// @@ -55,44 +55,49 @@ public partial class ResourceTags partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, 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.Api20200901.IResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags DeserializeFromDictionary(global::System.Collections.IDictionary content) { - return new ResourceTags(content); + return new TrackedResourceTags(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.Api20200901.IResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags DeserializeFromPSObject(global::System.Management.Automation.PSObject content) { - return new ResourceTags(content); + return new TrackedResourceTags(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.Api20200901.IResourceTags 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.Api30.ITrackedResourceTags 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(); /// - /// Deserializes a into a new instance of into a new instance of . /// /// The global::System.Collections.IDictionary content that should be used. - internal ResourceTags(global::System.Collections.IDictionary content) + internal TrackedResourceTags(global::System.Collections.IDictionary content) { bool returnNow = false; BeforeDeserializeDictionary(content, ref returnNow); @@ -107,11 +112,11 @@ internal ResourceTags(global::System.Collections.IDictionary 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 ResourceTags(global::System.Management.Automation.PSObject content) + internal TrackedResourceTags(global::System.Management.Automation.PSObject content) { bool returnNow = false; BeforeDeserializePSObject(content, ref returnNow); @@ -124,15 +129,10 @@ internal ResourceTags(global::System.Management.Automation.PSObject content) 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(); } - /// Resource tags - [System.ComponentModel.TypeConverter(typeof(ResourceTagsTypeConverter))] - public partial interface IResourceTags + /// Resource tags. + [System.ComponentModel.TypeConverter(typeof(TrackedResourceTagsTypeConverter))] + public partial interface ITrackedResourceTags { diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.TypeConverter.cs new file mode 100644 index 000000000000..7e7f5b08ff09 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.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.Api30 +{ + using Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + /// + /// A PowerShell PSTypeConverter to support converting to an instance of + /// + public partial class TrackedResourceTagsTypeConverter : 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.Api30.ITrackedResourceTags ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return TrackedResourceTags.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return TrackedResourceTags.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return TrackedResourceTags.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/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.cs new file mode 100644 index 000000000000..ed8809d27267 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.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.Api30 +{ + using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; + + /// Resource tags. + public partial class TrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTagsInternal + { + + /// Creates an new instance. + public TrackedResourceTags() + { + + } + } + /// Resource tags. + public partial interface ITrackedResourceTags : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IJsonSerializable, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray + { + + } + /// Resource tags. + internal partial interface ITrackedResourceTagsInternal + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.dictionary.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.dictionary.cs similarity index 94% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.dictionary.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.dictionary.cs index 4a7c4b2203f0..d0e09fbeb545 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.dictionary.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.dictionary.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - public partial class ResourceTags : + public partial class TrackedResourceTags : Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IAssociativeArray { protected global::System.Collections.Generic.Dictionary __additionalProperties = new global::System.Collections.Generic.Dictionary(); @@ -70,6 +70,6 @@ public void CopyFrom(global::System.Management.Automation.PSObject source) /// - public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.ResourceTags source) => source.__additionalProperties; + public static implicit operator global::System.Collections.Generic.Dictionary(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.TrackedResourceTags source) => source.__additionalProperties; } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.json.cs similarity index 85% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.json.cs index 3fcf257da4de..d0c6086a7023 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ResourceTags.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/Api30/TrackedResourceTags.json.cs @@ -3,12 +3,12 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30 { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - /// Resource tags - public partial class ResourceTags + /// Resource tags. + public partial class TrackedResourceTags { /// @@ -54,42 +54,25 @@ public partial class ResourceTags 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.Api20200901.IResourceTags. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ResourceTags(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new TrackedResourceTags(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 ResourceTags(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, null ,exclusions ); - 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) { @@ -105,5 +88,22 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro 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 TrackedResourceTags(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, null ,exclusions ); + AfterFromJson(json); + } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..45f2a9efb1cf --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.PowerShell.cs @@ -0,0 +1,155 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest 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(ManagedClustersAbortLatestOperationAcceptedResponseHeadersTypeConverter))] + public partial class ManagedClustersAbortLatestOperationAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// 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.IManagedClustersAbortLatestOperationAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClustersAbortLatestOperationAcceptedResponseHeaders(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.IManagedClustersAbortLatestOperationAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClustersAbortLatestOperationAcceptedResponseHeaders(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.IManagedClustersAbortLatestOperationAcceptedResponseHeaders 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 ManagedClustersAbortLatestOperationAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal)this).AzureAsyncOperation, 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 ManagedClustersAbortLatestOperationAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal)this).Location, global::System.Convert.ToString); + } + if (content.Contains("AzureAsyncOperation")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal)this).AzureAsyncOperation = (string) content.GetValueForProperty("AzureAsyncOperation",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal)this).AzureAsyncOperation, 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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClustersAbortLatestOperationAcceptedResponseHeadersTypeConverter))] + public partial interface IManagedClustersAbortLatestOperationAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..43bae822bc42 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.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 ManagedClustersAbortLatestOperationAcceptedResponseHeadersTypeConverter : 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.IManagedClustersAbortLatestOperationAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClustersAbortLatestOperationAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClustersAbortLatestOperationAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClustersAbortLatestOperationAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..bb52202b7bba --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.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; + + public partial class ManagedClustersAbortLatestOperationAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _azureAsyncOperation; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string AzureAsyncOperation { get => this._azureAsyncOperation; set => this._azureAsyncOperation = value; } + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public ManagedClustersAbortLatestOperationAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + if (headers.TryGetValues("Azure-AsyncOperation", out var __azureAsyncOperationHeader1)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal)this).AzureAsyncOperation = System.Linq.Enumerable.FirstOrDefault(__azureAsyncOperationHeader1) is string __headerAzureAsyncOperationHeader1 ? __headerAzureAsyncOperationHeader1 : (string)null; + } + } + } + public partial interface IManagedClustersAbortLatestOperationAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Azure-AsyncOperation", + PossibleTypes = new [] { typeof(string) })] + string AzureAsyncOperation { get; set; } + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IManagedClustersAbortLatestOperationAcceptedResponseHeadersInternal + + { + string AzureAsyncOperation { get; set; } + + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..a7a6fa58f6ba --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersAbortLatestOperationAcceptedResponseHeaders.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; + + public partial class ManagedClustersAbortLatestOperationAcceptedResponseHeaders + { + + /// + /// 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.IManagedClustersAbortLatestOperationAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersAbortLatestOperationAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClustersAbortLatestOperationAcceptedResponseHeaders(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 ManagedClustersAbortLatestOperationAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + 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; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..e346050df065 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.PowerShell.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; + + [System.ComponentModel.TypeConverter(typeof(ManagedClustersDeleteAcceptedResponseHeadersTypeConverter))] + public partial class ManagedClustersDeleteAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// 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.IManagedClustersDeleteAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClustersDeleteAcceptedResponseHeaders(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.IManagedClustersDeleteAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClustersDeleteAcceptedResponseHeaders(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.IManagedClustersDeleteAcceptedResponseHeaders 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 ManagedClustersDeleteAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeadersInternal)this).Location, 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 ManagedClustersDeleteAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeadersInternal)this).Location, 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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClustersDeleteAcceptedResponseHeadersTypeConverter))] + public partial interface IManagedClustersDeleteAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.TypeConverter.cs similarity index 82% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.TypeConverter.cs index efcf95b21794..beeab7e0bb98 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.TypeConverter.cs @@ -3,15 +3,15 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +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 ManagedClusterPropertiesIdentityProfileValueTypeConverter : global::System.Management.Automation.PSTypeConverter + public partial class ManagedClustersDeleteAcceptedResponseHeadersTypeConverter : global::System.Management.Automation.PSTypeConverter { /// @@ -27,13 +27,13 @@ public partial class ManagedClusterPropertiesIdentityProfileValueTypeConverter : 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, + /// true if the instance could be converted to a type, /// otherwise false /// public static bool CanConvertFrom(dynamic sourceValue) @@ -97,33 +97,33 @@ 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 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.Api20200901.IManagedClusterPropertiesIdentityProfileValue ConvertFrom(dynamic sourceValue) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) { if (null == sourceValue) { return null; } global::System.Type type = sourceValue.GetType(); - if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfileValue).IsAssignableFrom(type)) + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeaders).IsAssignableFrom(type)) { return sourceValue; } try { - return ManagedClusterPropertiesIdentityProfileValue.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + return ManagedClustersDeleteAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; } catch { @@ -131,11 +131,11 @@ public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManaged } if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) { - return ManagedClusterPropertiesIdentityProfileValue.DeserializeFromPSObject(sourceValue); + return ManagedClustersDeleteAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); } if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) { - return ManagedClusterPropertiesIdentityProfileValue.DeserializeFromDictionary(sourceValue); + return ManagedClustersDeleteAcceptedResponseHeaders.DeserializeFromDictionary(sourceValue); } return null; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..b675702c5c90 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.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; + + public partial class ManagedClustersDeleteAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public ManagedClustersDeleteAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IManagedClustersDeleteAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IManagedClustersDeleteAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.json.cs similarity index 84% rename from src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.json.cs rename to src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.json.cs index 826545d19fbc..32d6fa2389b3 100644 --- a/src/Aks/Aks.Autorest/generated/api/Models/Api20200901/ManagedClusterPropertiesIdentityProfileValue.json.cs +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersDeleteAcceptedResponseHeaders.json.cs @@ -3,11 +3,11 @@ // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. -namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901 +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Models { using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; - public partial class ManagedClusterPropertiesIdentityProfileValue + public partial class ManagedClustersDeleteAcceptedResponseHeaders { /// @@ -53,23 +53,23 @@ public partial class ManagedClusterPropertiesIdentityProfileValue 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.Api20200901.IManagedClusterPropertiesIdentityProfileValue. + /// Deserializes a into an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeaders. /// /// a to deserialize from. /// - /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfileValue. + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeaders. /// - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterPropertiesIdentityProfileValue FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersDeleteAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) { - return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClusterPropertiesIdentityProfileValue(json) : null; + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClustersDeleteAcceptedResponseHeaders(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 ManagedClusterPropertiesIdentityProfileValue(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + internal ManagedClustersDeleteAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) { bool returnNow = false; BeforeFromJson(json, ref returnNow); @@ -77,19 +77,18 @@ internal ManagedClusterPropertiesIdentityProfileValue(Microsoft.Azure.PowerShell { return; } - __userAssignedIdentity = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.UserAssignedIdentity(json); AfterFromJson(json); } /// - /// Serializes this instance of into a 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 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) @@ -102,7 +101,6 @@ public Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode ToJson(Micro { return container; } - __userAssignedIdentity?.ToJson(container, serializationMode); AfterToJson(ref container); return container; } diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..c268af4371de --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.PowerShell.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; + + [System.ComponentModel.TypeConverter(typeof(ManagedClustersGetCommandResultAcceptedResponseHeadersTypeConverter))] + public partial class ManagedClustersGetCommandResultAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// 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.IManagedClustersGetCommandResultAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClustersGetCommandResultAcceptedResponseHeaders(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.IManagedClustersGetCommandResultAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClustersGetCommandResultAcceptedResponseHeaders(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.IManagedClustersGetCommandResultAcceptedResponseHeaders 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 ManagedClustersGetCommandResultAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersGetCommandResultAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersGetCommandResultAcceptedResponseHeadersInternal)this).Location, 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 ManagedClustersGetCommandResultAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersGetCommandResultAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersGetCommandResultAcceptedResponseHeadersInternal)this).Location, 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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClustersGetCommandResultAcceptedResponseHeadersTypeConverter))] + public partial interface IManagedClustersGetCommandResultAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..2db949de7f6d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.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 ManagedClustersGetCommandResultAcceptedResponseHeadersTypeConverter : 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.IManagedClustersGetCommandResultAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersGetCommandResultAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClustersGetCommandResultAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClustersGetCommandResultAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClustersGetCommandResultAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..82ec6c2d816c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.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; + + public partial class ManagedClustersGetCommandResultAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersGetCommandResultAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersGetCommandResultAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public ManagedClustersGetCommandResultAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersGetCommandResultAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IManagedClustersGetCommandResultAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IManagedClustersGetCommandResultAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..7734fa55e0d6 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersGetCommandResultAcceptedResponseHeaders.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; + + public partial class ManagedClustersGetCommandResultAcceptedResponseHeaders + { + + /// + /// 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.IManagedClustersGetCommandResultAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersGetCommandResultAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersGetCommandResultAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClustersGetCommandResultAcceptedResponseHeaders(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 ManagedClustersGetCommandResultAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + 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; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..6e24fb66797d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.PowerShell.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; + + [System.ComponentModel.TypeConverter(typeof(ManagedClustersResetAadProfileAcceptedResponseHeadersTypeConverter))] + public partial class ManagedClustersResetAadProfileAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// 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.IManagedClustersResetAadProfileAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClustersResetAadProfileAcceptedResponseHeaders(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.IManagedClustersResetAadProfileAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClustersResetAadProfileAcceptedResponseHeaders(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.IManagedClustersResetAadProfileAcceptedResponseHeaders 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 ManagedClustersResetAadProfileAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetAadProfileAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetAadProfileAcceptedResponseHeadersInternal)this).Location, 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 ManagedClustersResetAadProfileAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetAadProfileAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetAadProfileAcceptedResponseHeadersInternal)this).Location, 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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClustersResetAadProfileAcceptedResponseHeadersTypeConverter))] + public partial interface IManagedClustersResetAadProfileAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..8ba4ead24a28 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.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 ManagedClustersResetAadProfileAcceptedResponseHeadersTypeConverter : 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.IManagedClustersResetAadProfileAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetAadProfileAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClustersResetAadProfileAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClustersResetAadProfileAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClustersResetAadProfileAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..a92e03384253 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.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; + + public partial class ManagedClustersResetAadProfileAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetAadProfileAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetAadProfileAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public ManagedClustersResetAadProfileAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetAadProfileAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IManagedClustersResetAadProfileAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IManagedClustersResetAadProfileAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..17737710676c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetAadProfileAcceptedResponseHeaders.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; + + public partial class ManagedClustersResetAadProfileAcceptedResponseHeaders + { + + /// + /// 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.IManagedClustersResetAadProfileAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetAadProfileAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetAadProfileAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClustersResetAadProfileAcceptedResponseHeaders(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 ManagedClustersResetAadProfileAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + 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; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..7603731fa512 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.PowerShell.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; + + [System.ComponentModel.TypeConverter(typeof(ManagedClustersResetServicePrincipalProfileAcceptedResponseHeadersTypeConverter))] + public partial class ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// 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.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders(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.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders(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.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders 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 ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeadersInternal)this).Location, 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 ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeadersInternal)this).Location, 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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClustersResetServicePrincipalProfileAcceptedResponseHeadersTypeConverter))] + public partial interface IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..b14639c0ebd5 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.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 ManagedClustersResetServicePrincipalProfileAcceptedResponseHeadersTypeConverter : 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.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..f514bfae65e0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.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; + + public partial class ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IManagedClustersResetServicePrincipalProfileAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..fcd33c9b6f24 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders.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; + + public partial class ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders + { + + /// + /// 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.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders(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 ManagedClustersResetServicePrincipalProfileAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + 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; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..7539032dd5a5 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.PowerShell.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; + + [System.ComponentModel.TypeConverter(typeof(ManagedClustersRotateClusterCertificatesAcceptedResponseHeadersTypeConverter))] + public partial class ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// 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.IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders(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.IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders(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.IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders 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 ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateClusterCertificatesAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateClusterCertificatesAcceptedResponseHeadersInternal)this).Location, 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 ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateClusterCertificatesAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateClusterCertificatesAcceptedResponseHeadersInternal)this).Location, 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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClustersRotateClusterCertificatesAcceptedResponseHeadersTypeConverter))] + public partial interface IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..50a7f14703c0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.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 ManagedClustersRotateClusterCertificatesAcceptedResponseHeadersTypeConverter : 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.IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..56ebad14fe0b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.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; + + public partial class ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateClusterCertificatesAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateClusterCertificatesAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IManagedClustersRotateClusterCertificatesAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..cecedf3eac7d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders.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; + + public partial class ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders + { + + /// + /// 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.IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateClusterCertificatesAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders(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 ManagedClustersRotateClusterCertificatesAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + 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; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..7e166b93ab26 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.PowerShell.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; + + [System.ComponentModel.TypeConverter(typeof(ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeadersTypeConverter))] + public partial class ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// 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.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders(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.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders(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.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders 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 ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeadersInternal)this).Location, 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 ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeadersInternal)this).Location, 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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeadersTypeConverter))] + public partial interface IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..112805dfe9fe --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.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 ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeadersTypeConverter : 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.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..e56820e4b345 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.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; + + public partial class ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..58727b3836c3 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders.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; + + public partial class ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders + { + + /// + /// 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.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders(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 ManagedClustersRotateServiceAccountSigningKeysAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + 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; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..a9ef8bb6b3c8 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.PowerShell.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; + + [System.ComponentModel.TypeConverter(typeof(ManagedClustersRunCommandAcceptedResponseHeadersTypeConverter))] + public partial class ManagedClustersRunCommandAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// 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.IManagedClustersRunCommandAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClustersRunCommandAcceptedResponseHeaders(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.IManagedClustersRunCommandAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClustersRunCommandAcceptedResponseHeaders(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.IManagedClustersRunCommandAcceptedResponseHeaders 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 ManagedClustersRunCommandAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRunCommandAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRunCommandAcceptedResponseHeadersInternal)this).Location, 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 ManagedClustersRunCommandAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRunCommandAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRunCommandAcceptedResponseHeadersInternal)this).Location, 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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClustersRunCommandAcceptedResponseHeadersTypeConverter))] + public partial interface IManagedClustersRunCommandAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..c5a9380539d9 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.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 ManagedClustersRunCommandAcceptedResponseHeadersTypeConverter : 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.IManagedClustersRunCommandAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRunCommandAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClustersRunCommandAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClustersRunCommandAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClustersRunCommandAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..734d3896bd3c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.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; + + public partial class ManagedClustersRunCommandAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRunCommandAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRunCommandAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public ManagedClustersRunCommandAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRunCommandAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IManagedClustersRunCommandAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IManagedClustersRunCommandAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..c11b76b0d4b4 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersRunCommandAcceptedResponseHeaders.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; + + public partial class ManagedClustersRunCommandAcceptedResponseHeaders + { + + /// + /// 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.IManagedClustersRunCommandAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRunCommandAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersRunCommandAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClustersRunCommandAcceptedResponseHeaders(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 ManagedClustersRunCommandAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + 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; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..cc8a69449072 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.PowerShell.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; + + [System.ComponentModel.TypeConverter(typeof(ManagedClustersStartAcceptedResponseHeadersTypeConverter))] + public partial class ManagedClustersStartAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// 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.IManagedClustersStartAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClustersStartAcceptedResponseHeaders(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.IManagedClustersStartAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClustersStartAcceptedResponseHeaders(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.IManagedClustersStartAcceptedResponseHeaders 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 ManagedClustersStartAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStartAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStartAcceptedResponseHeadersInternal)this).Location, 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 ManagedClustersStartAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStartAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStartAcceptedResponseHeadersInternal)this).Location, 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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClustersStartAcceptedResponseHeadersTypeConverter))] + public partial interface IManagedClustersStartAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..5177a1032eb2 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.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 ManagedClustersStartAcceptedResponseHeadersTypeConverter : 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.IManagedClustersStartAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStartAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClustersStartAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClustersStartAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClustersStartAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..90fd1feaee44 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.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; + + public partial class ManagedClustersStartAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStartAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStartAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public ManagedClustersStartAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStartAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IManagedClustersStartAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IManagedClustersStartAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..38c733fc230c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStartAcceptedResponseHeaders.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 ManagedClustersStartAcceptedResponseHeaders + { + + /// + /// 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.IManagedClustersStartAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStartAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStartAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClustersStartAcceptedResponseHeaders(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 ManagedClustersStartAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + 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; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.PowerShell.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.PowerShell.cs new file mode 100644 index 000000000000..94be88f5dfca --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.PowerShell.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 Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.PowerShell; + + [System.ComponentModel.TypeConverter(typeof(ManagedClustersStopAcceptedResponseHeadersTypeConverter))] + public partial class ManagedClustersStopAcceptedResponseHeaders + { + + /// + /// 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); + + /// + /// 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.IManagedClustersStopAcceptedResponseHeaders DeserializeFromDictionary(global::System.Collections.IDictionary content) + { + return new ManagedClustersStopAcceptedResponseHeaders(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.IManagedClustersStopAcceptedResponseHeaders DeserializeFromPSObject(global::System.Management.Automation.PSObject content) + { + return new ManagedClustersStopAcceptedResponseHeaders(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.IManagedClustersStopAcceptedResponseHeaders 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 ManagedClustersStopAcceptedResponseHeaders(global::System.Collections.IDictionary content) + { + bool returnNow = false; + BeforeDeserializeDictionary(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStopAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStopAcceptedResponseHeadersInternal)this).Location, 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 ManagedClustersStopAcceptedResponseHeaders(global::System.Management.Automation.PSObject content) + { + bool returnNow = false; + BeforeDeserializePSObject(content, ref returnNow); + if (returnNow) + { + return; + } + // actually deserialize + if (content.Contains("Location")) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStopAcceptedResponseHeadersInternal)this).Location = (string) content.GetValueForProperty("Location",((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStopAcceptedResponseHeadersInternal)this).Location, 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(); + } + [System.ComponentModel.TypeConverter(typeof(ManagedClustersStopAcceptedResponseHeadersTypeConverter))] + public partial interface IManagedClustersStopAcceptedResponseHeaders + + { + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.TypeConverter.cs new file mode 100644 index 000000000000..eee49d027cf1 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.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 ManagedClustersStopAcceptedResponseHeadersTypeConverter : 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.IManagedClustersStopAcceptedResponseHeaders ConvertFrom(dynamic sourceValue) + { + if (null == sourceValue) + { + return null; + } + global::System.Type type = sourceValue.GetType(); + if (typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStopAcceptedResponseHeaders).IsAssignableFrom(type)) + { + return sourceValue; + } + try + { + return ManagedClustersStopAcceptedResponseHeaders.FromJsonString(typeof(string) == sourceValue.GetType() ? sourceValue : sourceValue.ToJsonString());; + } + catch + { + // Unable to use JSON pattern + } + if (typeof(global::System.Management.Automation.PSObject).IsAssignableFrom(type)) + { + return ManagedClustersStopAcceptedResponseHeaders.DeserializeFromPSObject(sourceValue); + } + if (typeof(global::System.Collections.IDictionary).IsAssignableFrom(type)) + { + return ManagedClustersStopAcceptedResponseHeaders.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/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.cs new file mode 100644 index 000000000000..d91c7a61c238 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.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; + + public partial class ManagedClustersStopAcceptedResponseHeaders : + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStopAcceptedResponseHeaders, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStopAcceptedResponseHeadersInternal, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable + { + + /// Backing field for property. + private string _location; + + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Origin(Microsoft.Azure.PowerShell.Cmdlets.Aks.PropertyOrigin.Owned)] + public string Location { get => this._location; set => this._location = value; } + + /// + /// Creates an new instance. + /// + public ManagedClustersStopAcceptedResponseHeaders() + { + + } + + /// + void Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IHeaderSerializable.ReadHeaders(global::System.Net.Http.Headers.HttpResponseHeaders headers) + { + if (headers.TryGetValues("Location", out var __locationHeader0)) + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStopAcceptedResponseHeadersInternal)this).Location = System.Linq.Enumerable.FirstOrDefault(__locationHeader0) is string __headerLocationHeader0 ? __headerLocationHeader0 : (string)null; + } + } + } + public partial interface IManagedClustersStopAcceptedResponseHeaders + + { + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = false, + ReadOnly = false, + Description = @"", + SerializedName = @"Location", + PossibleTypes = new [] { typeof(string) })] + string Location { get; set; } + + } + internal partial interface IManagedClustersStopAcceptedResponseHeadersInternal + + { + string Location { get; set; } + + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.json.cs b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.json.cs new file mode 100644 index 000000000000..18a089bbc69b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Models/ManagedClustersStopAcceptedResponseHeaders.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 ManagedClustersStopAcceptedResponseHeaders + { + + /// + /// 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.IManagedClustersStopAcceptedResponseHeaders. + /// + /// a to deserialize from. + /// + /// an instance of Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStopAcceptedResponseHeaders. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IManagedClustersStopAcceptedResponseHeaders FromJson(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonNode node) + { + return node is Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json ? new ManagedClustersStopAcceptedResponseHeaders(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 ManagedClustersStopAcceptedResponseHeaders(Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Json.JsonObject json) + { + bool returnNow = false; + BeforeFromJson(json, ref returnNow); + if (returnNow) + { + return; + } + 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; + } + AfterToJson(ref container); + return container; + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.Completer.cs index fca2014a44df..7cc2c03489c2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.Completer.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// AgentPoolMode represents 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 + /// [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolModeTypeConverter))] public partial struct AgentPoolMode : System.Management.Automation.IArgumentCompleter diff --git a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.TypeConverter.cs index a0b250c92d71..c210481deb96 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.TypeConverter.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// AgentPoolMode represents 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 + /// public partial class AgentPoolModeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.cs b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.cs index 1b39835db417..51603ab08284 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolMode.cs @@ -6,12 +6,20 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// AgentPoolMode represents 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 + /// public partial struct AgentPoolMode : System.IEquatable { + /// + /// System agent pools are primarily for hosting critical system pods such as CoreDNS and metrics-server. System agent pools + /// osType must be Linux. System agent pools VM SKU must have at least 2vCPUs and 4GB of memory. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode System = @"System"; + /// User agent pools are primarily for hosting your application pods. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolMode User = @"User"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.Completer.cs index c75c0fa3e300..428cda8c8b1b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// AgentPoolType represents types of an agent pool. + /// The type of Agent Pool. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolTypeTypeConverter))] public partial struct AgentPoolType : System.Management.Automation.IArgumentCompleter diff --git a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.TypeConverter.cs index 90f223d9f3ae..ca7f20cca406 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// AgentPoolType represents types of an agent pool. + /// The type of Agent Pool. public partial class AgentPoolTypeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.cs b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.cs index 74a04c7b76b9..b3dda65d5b9c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/AgentPoolType.cs @@ -6,12 +6,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// AgentPoolType represents types of an agent pool. + /// The type of Agent Pool. public partial struct AgentPoolType : System.IEquatable { + /// Use of this is strongly discouraged. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType AvailabilitySet = @"AvailabilitySet"; + /// Create an Agent Pool backed by a Virtual Machine Scale Set. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.AgentPoolType VirtualMachineScaleSets = @"VirtualMachineScaleSets"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/Code.cs b/src/Aks/Aks.Autorest/generated/api/Support/Code.cs index 174a10d10420..c78b04ddbf36 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/Code.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/Code.cs @@ -10,8 +10,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support public partial struct Code : System.IEquatable { + /// The cluster is running. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code Running = @"Running"; + /// The cluster is stopped. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Code Stopped = @"Stopped"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.Completer.cs deleted file mode 100644 index ca7675291ae6..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.Completer.cs +++ /dev/null @@ -1,727 +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.Support -{ - - /// Size of agent VMs. - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypesTypeConverter))] - public partial struct ContainerServiceVMSizeTypes : - System.Management.Automation.IArgumentCompleter - { - - /// - /// Implementations of this function are called by PowerShell to complete arguments. - /// - /// The name of the command that needs argument completion. - /// The name of the parameter that needs argument completion. - /// The (possibly empty) word being completed. - /// The command ast in case it is needed for completion. - /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot - /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. - /// - /// A collection of completion results, most like with ResultType set to ParameterValue. - /// - public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) - { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A1".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A1'", "Standard_A1", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A1"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A10".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A10'", "Standard_A10", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A10"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A11".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A11'", "Standard_A11", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A11"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A1_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A1_v2'", "Standard_A1_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A1_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A2'", "Standard_A2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A2_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A2_v2'", "Standard_A2_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A2_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A2m_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A2m_v2'", "Standard_A2m_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A2m_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A3'", "Standard_A3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A4".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A4'", "Standard_A4", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A4"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A4_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A4_v2'", "Standard_A4_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A4_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A4m_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A4m_v2'", "Standard_A4m_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A4m_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A5".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A5'", "Standard_A5", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A5"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A6".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A6'", "Standard_A6", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A6"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A7".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A7'", "Standard_A7", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A7"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A8".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A8'", "Standard_A8", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A8"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A8_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A8_v2'", "Standard_A8_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A8_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A8m_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A8m_v2'", "Standard_A8m_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A8m_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_A9".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_A9'", "Standard_A9", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_A9"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_B2ms".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_B2ms'", "Standard_B2ms", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_B2ms"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_B2s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_B2s'", "Standard_B2s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_B2s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_B4ms".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_B4ms'", "Standard_B4ms", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_B4ms"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_B8ms".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_B8ms'", "Standard_B8ms", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_B8ms"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D1".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D1'", "Standard_D1", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D1"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D11".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D11'", "Standard_D11", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D11"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D11_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D11_v2'", "Standard_D11_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D11_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D11_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D11_v2_Promo'", "Standard_D11_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D11_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D12".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D12'", "Standard_D12", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D12"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D12_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D12_v2'", "Standard_D12_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D12_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D12_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D12_v2_Promo'", "Standard_D12_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D12_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D13".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D13'", "Standard_D13", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D13"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D13_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D13_v2'", "Standard_D13_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D13_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D13_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D13_v2_Promo'", "Standard_D13_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D13_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D14".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D14'", "Standard_D14", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D14"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D14_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D14_v2'", "Standard_D14_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D14_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D14_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D14_v2_Promo'", "Standard_D14_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D14_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D15_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D15_v2'", "Standard_D15_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D15_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D16_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D16_v3'", "Standard_D16_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D16_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D16s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D16s_v3'", "Standard_D16s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D16s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D1_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D1_v2'", "Standard_D1_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D1_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D2'", "Standard_D2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D2_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D2_v2'", "Standard_D2_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D2_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D2_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D2_v2_Promo'", "Standard_D2_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D2_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D2_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D2_v3'", "Standard_D2_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D2_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D2s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D2s_v3'", "Standard_D2s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D2s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D3'", "Standard_D3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D32_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D32_v3'", "Standard_D32_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D32_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D32s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D32s_v3'", "Standard_D32s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D32s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D3_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D3_v2'", "Standard_D3_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D3_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D3_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D3_v2_Promo'", "Standard_D3_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D3_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D4".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D4'", "Standard_D4", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D4"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D4_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D4_v2'", "Standard_D4_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D4_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D4_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D4_v2_Promo'", "Standard_D4_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D4_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D4_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D4_v3'", "Standard_D4_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D4_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D4s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D4s_v3'", "Standard_D4s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D4s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D5_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D5_v2'", "Standard_D5_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D5_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D5_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D5_v2_Promo'", "Standard_D5_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D5_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D64_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D64_v3'", "Standard_D64_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D64_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D64s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D64s_v3'", "Standard_D64s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D64s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D8_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D8_v3'", "Standard_D8_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D8_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_D8s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_D8s_v3'", "Standard_D8s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_D8s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS1".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS1'", "Standard_DS1", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS1"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS11".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS11'", "Standard_DS11", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS11"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS11_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS11_v2'", "Standard_DS11_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS11_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS11_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS11_v2_Promo'", "Standard_DS11_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS11_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS12".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS12'", "Standard_DS12", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS12"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS12_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS12_v2'", "Standard_DS12_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS12_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS12_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS12_v2_Promo'", "Standard_DS12_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS12_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS13".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS13'", "Standard_DS13", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS13"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS13-2_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS13-2_v2'", "Standard_DS13-2_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS13-2_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS13-4_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS13-4_v2'", "Standard_DS13-4_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS13-4_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS13_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS13_v2'", "Standard_DS13_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS13_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS13_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS13_v2_Promo'", "Standard_DS13_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS13_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS14".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS14'", "Standard_DS14", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS14"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS14-4_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS14-4_v2'", "Standard_DS14-4_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS14-4_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS14-8_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS14-8_v2'", "Standard_DS14-8_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS14-8_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS14_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS14_v2'", "Standard_DS14_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS14_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS14_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS14_v2_Promo'", "Standard_DS14_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS14_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS15_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS15_v2'", "Standard_DS15_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS15_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS1_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS1_v2'", "Standard_DS1_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS1_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS2'", "Standard_DS2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS2_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS2_v2'", "Standard_DS2_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS2_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS2_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS2_v2_Promo'", "Standard_DS2_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS2_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS3'", "Standard_DS3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS3_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS3_v2'", "Standard_DS3_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS3_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS3_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS3_v2_Promo'", "Standard_DS3_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS3_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS4".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS4'", "Standard_DS4", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS4"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS4_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS4_v2'", "Standard_DS4_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS4_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS4_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS4_v2_Promo'", "Standard_DS4_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS4_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS5_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS5_v2'", "Standard_DS5_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS5_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_DS5_v2_Promo".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_DS5_v2_Promo'", "Standard_DS5_v2_Promo", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_DS5_v2_Promo"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E16_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E16_v3'", "Standard_E16_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E16_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E16s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E16s_v3'", "Standard_E16s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E16s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E2_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E2_v3'", "Standard_E2_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E2_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E2s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E2s_v3'", "Standard_E2s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E2s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E32-16s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E32-16s_v3'", "Standard_E32-16s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E32-16s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E32-8s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E32-8s_v3'", "Standard_E32-8s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E32-8s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E32_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E32_v3'", "Standard_E32_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E32_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E32s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E32s_v3'", "Standard_E32s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E32s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E4_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E4_v3'", "Standard_E4_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E4_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E4s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E4s_v3'", "Standard_E4s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E4s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E64-16s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E64-16s_v3'", "Standard_E64-16s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E64-16s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E64-32s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E64-32s_v3'", "Standard_E64-32s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E64-32s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E64_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E64_v3'", "Standard_E64_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E64_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E64s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E64s_v3'", "Standard_E64s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E64s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E8_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E8_v3'", "Standard_E8_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E8_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_E8s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_E8s_v3'", "Standard_E8s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_E8s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F1".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F1'", "Standard_F1", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F1"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F16".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F16'", "Standard_F16", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F16"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F16s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F16s'", "Standard_F16s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F16s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F16s_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F16s_v2'", "Standard_F16s_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F16s_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F1s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F1s'", "Standard_F1s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F1s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F2'", "Standard_F2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F2s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F2s'", "Standard_F2s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F2s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F2s_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F2s_v2'", "Standard_F2s_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F2s_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F32s_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F32s_v2'", "Standard_F32s_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F32s_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F4".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F4'", "Standard_F4", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F4"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F4s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F4s'", "Standard_F4s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F4s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F4s_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F4s_v2'", "Standard_F4s_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F4s_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F64s_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F64s_v2'", "Standard_F64s_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F64s_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F72s_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F72s_v2'", "Standard_F72s_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F72s_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F8".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F8'", "Standard_F8", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F8"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F8s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F8s'", "Standard_F8s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F8s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_F8s_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_F8s_v2'", "Standard_F8s_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_F8s_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_G1".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_G1'", "Standard_G1", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_G1"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_G2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_G2'", "Standard_G2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_G2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_G3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_G3'", "Standard_G3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_G3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_G4".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_G4'", "Standard_G4", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_G4"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_G5".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_G5'", "Standard_G5", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_G5"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_GS1".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_GS1'", "Standard_GS1", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_GS1"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_GS2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_GS2'", "Standard_GS2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_GS2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_GS3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_GS3'", "Standard_GS3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_GS3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_GS4".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_GS4'", "Standard_GS4", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_GS4"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_GS4-4".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_GS4-4'", "Standard_GS4-4", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_GS4-4"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_GS4-8".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_GS4-8'", "Standard_GS4-8", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_GS4-8"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_GS5".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_GS5'", "Standard_GS5", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_GS5"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_GS5-16".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_GS5-16'", "Standard_GS5-16", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_GS5-16"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_GS5-8".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_GS5-8'", "Standard_GS5-8", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_GS5-8"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_H16".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_H16'", "Standard_H16", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_H16"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_H16m".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_H16m'", "Standard_H16m", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_H16m"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_H16mr".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_H16mr'", "Standard_H16mr", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_H16mr"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_H16r".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_H16r'", "Standard_H16r", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_H16r"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_H8".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_H8'", "Standard_H8", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_H8"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_H8m".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_H8m'", "Standard_H8m", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_H8m"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_L16s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_L16s'", "Standard_L16s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_L16s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_L32s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_L32s'", "Standard_L32s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_L32s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_L4s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_L4s'", "Standard_L4s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_L4s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_L8s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_L8s'", "Standard_L8s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_L8s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_M128-32ms".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_M128-32ms'", "Standard_M128-32ms", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_M128-32ms"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_M128-64ms".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_M128-64ms'", "Standard_M128-64ms", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_M128-64ms"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_M128ms".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_M128ms'", "Standard_M128ms", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_M128ms"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_M128s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_M128s'", "Standard_M128s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_M128s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_M64-16ms".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_M64-16ms'", "Standard_M64-16ms", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_M64-16ms"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_M64-32ms".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_M64-32ms'", "Standard_M64-32ms", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_M64-32ms"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_M64ms".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_M64ms'", "Standard_M64ms", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_M64ms"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_M64s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_M64s'", "Standard_M64s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_M64s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC12".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC12'", "Standard_NC12", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC12"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC12s_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC12s_v2'", "Standard_NC12s_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC12s_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC12s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC12s_v3'", "Standard_NC12s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC12s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC24".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC24'", "Standard_NC24", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC24"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC24r".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC24r'", "Standard_NC24r", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC24r"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC24rs_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC24rs_v2'", "Standard_NC24rs_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC24rs_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC24rs_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC24rs_v3'", "Standard_NC24rs_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC24rs_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC24s_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC24s_v2'", "Standard_NC24s_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC24s_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC24s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC24s_v3'", "Standard_NC24s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC24s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC6".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC6'", "Standard_NC6", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC6"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC6s_v2".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC6s_v2'", "Standard_NC6s_v2", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC6s_v2"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NC6s_v3".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NC6s_v3'", "Standard_NC6s_v3", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NC6s_v3"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_ND12s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_ND12s'", "Standard_ND12s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_ND12s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_ND24rs".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_ND24rs'", "Standard_ND24rs", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_ND24rs"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_ND24s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_ND24s'", "Standard_ND24s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_ND24s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_ND6s".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_ND6s'", "Standard_ND6s", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_ND6s"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NV12".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NV12'", "Standard_NV12", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NV12"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NV24".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NV24'", "Standard_NV24", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NV24"); - } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard_NV6".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) - { - yield return new global::System.Management.Automation.CompletionResult("'Standard_NV6'", "Standard_NV6", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard_NV6"); - } - } - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.cs b/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.cs deleted file mode 100644 index 3605dfadda09..000000000000 --- a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.cs +++ /dev/null @@ -1,446 +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.Support -{ - - /// Size of agent VMs. - public partial struct ContainerServiceVMSizeTypes : - System.IEquatable - { - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA1 = @"Standard_A1"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA10 = @"Standard_A10"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA11 = @"Standard_A11"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA1V2 = @"Standard_A1_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA2 = @"Standard_A2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA2MV2 = @"Standard_A2m_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA2V2 = @"Standard_A2_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA3 = @"Standard_A3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA4 = @"Standard_A4"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA4MV2 = @"Standard_A4m_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA4V2 = @"Standard_A4_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA5 = @"Standard_A5"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA6 = @"Standard_A6"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA7 = @"Standard_A7"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA8 = @"Standard_A8"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA8MV2 = @"Standard_A8m_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA8V2 = @"Standard_A8_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardA9 = @"Standard_A9"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardB2MS = @"Standard_B2ms"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardB2S = @"Standard_B2s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardB4MS = @"Standard_B4ms"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardB8MS = @"Standard_B8ms"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD1 = @"Standard_D1"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD11 = @"Standard_D11"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD11V2 = @"Standard_D11_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD11V2Promo = @"Standard_D11_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD12 = @"Standard_D12"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD12V2 = @"Standard_D12_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD12V2Promo = @"Standard_D12_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD13 = @"Standard_D13"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD13V2 = @"Standard_D13_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD13V2Promo = @"Standard_D13_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD14 = @"Standard_D14"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD14V2 = @"Standard_D14_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD14V2Promo = @"Standard_D14_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD15V2 = @"Standard_D15_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD16SV3 = @"Standard_D16s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD16V3 = @"Standard_D16_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD1V2 = @"Standard_D1_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD2 = @"Standard_D2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD2SV3 = @"Standard_D2s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD2V2 = @"Standard_D2_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD2V2Promo = @"Standard_D2_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD2V3 = @"Standard_D2_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD3 = @"Standard_D3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD32SV3 = @"Standard_D32s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD32V3 = @"Standard_D32_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD3V2 = @"Standard_D3_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD3V2Promo = @"Standard_D3_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD4 = @"Standard_D4"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD4SV3 = @"Standard_D4s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD4V2 = @"Standard_D4_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD4V2Promo = @"Standard_D4_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD4V3 = @"Standard_D4_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD5V2 = @"Standard_D5_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD5V2Promo = @"Standard_D5_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD64SV3 = @"Standard_D64s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD64V3 = @"Standard_D64_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD8SV3 = @"Standard_D8s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardD8V3 = @"Standard_D8_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs1 = @"Standard_DS1"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs11 = @"Standard_DS11"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs11V2 = @"Standard_DS11_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs11V2Promo = @"Standard_DS11_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs12 = @"Standard_DS12"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs12V2 = @"Standard_DS12_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs12V2Promo = @"Standard_DS12_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs13 = @"Standard_DS13"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs132V2 = @"Standard_DS13-2_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs134V2 = @"Standard_DS13-4_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs13V2 = @"Standard_DS13_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs13V2Promo = @"Standard_DS13_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs14 = @"Standard_DS14"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs144V2 = @"Standard_DS14-4_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs148V2 = @"Standard_DS14-8_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs14V2 = @"Standard_DS14_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs14V2Promo = @"Standard_DS14_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs15V2 = @"Standard_DS15_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs1V2 = @"Standard_DS1_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs2 = @"Standard_DS2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs2V2 = @"Standard_DS2_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs2V2Promo = @"Standard_DS2_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs3 = @"Standard_DS3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs3V2 = @"Standard_DS3_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs3V2Promo = @"Standard_DS3_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs4 = @"Standard_DS4"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs4V2 = @"Standard_DS4_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs4V2Promo = @"Standard_DS4_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs5V2 = @"Standard_DS5_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardDs5V2Promo = @"Standard_DS5_v2_Promo"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE16SV3 = @"Standard_E16s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE16V3 = @"Standard_E16_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE2SV3 = @"Standard_E2s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE2V3 = @"Standard_E2_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE3216SV3 = @"Standard_E32-16s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE328SV3 = @"Standard_E32-8s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE32SV3 = @"Standard_E32s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE32V3 = @"Standard_E32_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE4SV3 = @"Standard_E4s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE4V3 = @"Standard_E4_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE6416SV3 = @"Standard_E64-16s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE6432SV3 = @"Standard_E64-32s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE64SV3 = @"Standard_E64s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE64V3 = @"Standard_E64_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE8SV3 = @"Standard_E8s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardE8V3 = @"Standard_E8_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF1 = @"Standard_F1"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF16 = @"Standard_F16"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF16S = @"Standard_F16s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF16SV2 = @"Standard_F16s_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF1S = @"Standard_F1s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF2 = @"Standard_F2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF2S = @"Standard_F2s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF2SV2 = @"Standard_F2s_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF32SV2 = @"Standard_F32s_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF4 = @"Standard_F4"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF4S = @"Standard_F4s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF4SV2 = @"Standard_F4s_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF64SV2 = @"Standard_F64s_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF72SV2 = @"Standard_F72s_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF8 = @"Standard_F8"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF8S = @"Standard_F8s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardF8SV2 = @"Standard_F8s_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardG1 = @"Standard_G1"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardG2 = @"Standard_G2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardG3 = @"Standard_G3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardG4 = @"Standard_G4"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardG5 = @"Standard_G5"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardGs1 = @"Standard_GS1"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardGs2 = @"Standard_GS2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardGs3 = @"Standard_GS3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardGs4 = @"Standard_GS4"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardGs44 = @"Standard_GS4-4"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardGs48 = @"Standard_GS4-8"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardGs5 = @"Standard_GS5"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardGs516 = @"Standard_GS5-16"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardGs58 = @"Standard_GS5-8"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardH16 = @"Standard_H16"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardH16M = @"Standard_H16m"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardH16Mr = @"Standard_H16mr"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardH16R = @"Standard_H16r"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardH8 = @"Standard_H8"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardH8M = @"Standard_H8m"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardL16S = @"Standard_L16s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardL32S = @"Standard_L32s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardL4S = @"Standard_L4s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardL8S = @"Standard_L8s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardM12832MS = @"Standard_M128-32ms"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardM12864MS = @"Standard_M128-64ms"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardM128MS = @"Standard_M128ms"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardM128S = @"Standard_M128s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardM6416MS = @"Standard_M64-16ms"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardM6432MS = @"Standard_M64-32ms"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardM64MS = @"Standard_M64ms"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardM64S = @"Standard_M64s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc12 = @"Standard_NC12"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc12SV2 = @"Standard_NC12s_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc12SV3 = @"Standard_NC12s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc24 = @"Standard_NC24"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc24R = @"Standard_NC24r"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc24RsV2 = @"Standard_NC24rs_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc24RsV3 = @"Standard_NC24rs_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc24SV2 = @"Standard_NC24s_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc24SV3 = @"Standard_NC24s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc6 = @"Standard_NC6"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc6SV2 = @"Standard_NC6s_v2"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNc6SV3 = @"Standard_NC6s_v3"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNd12S = @"Standard_ND12s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNd24Rs = @"Standard_ND24rs"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNd24S = @"Standard_ND24s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNd6S = @"Standard_ND6s"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNv12 = @"Standard_NV12"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNv24 = @"Standard_NV24"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes StandardNv6 = @"Standard_NV6"; - - /// - /// the value for an instance of the Enum. - /// - private string _value { get; set; } - - /// - /// Creates an instance of the Enum class. - /// - /// the value to create an instance for. - private ContainerServiceVMSizeTypes(string underlyingValue) - { - this._value = underlyingValue; - } - - /// Conversion from arbitrary object to ContainerServiceVMSizeTypes - /// the value to convert to an instance of . - internal static object CreateFrom(object value) - { - return new ContainerServiceVMSizeTypes(global::System.Convert.ToString(value)); - } - - /// Compares values of enum type ContainerServiceVMSizeTypes - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes e) - { - return _value.Equals(e._value); - } - - /// Compares values of enum type ContainerServiceVMSizeTypes (override for Object) - /// the value to compare against this instance. - /// true if the two instances are equal to the same value - public override bool Equals(object obj) - { - return obj is ContainerServiceVMSizeTypes && Equals((ContainerServiceVMSizeTypes)obj); - } - - /// Returns hashCode for enum ContainerServiceVMSizeTypes - /// The hashCode of the value - public override int GetHashCode() - { - return this._value.GetHashCode(); - } - - /// Returns string representation for ContainerServiceVMSizeTypes - /// A string for this value. - public override string ToString() - { - return this._value; - } - - /// Implicit operator to convert string to ContainerServiceVMSizeTypes - /// the value to convert to an instance of . - - public static implicit operator ContainerServiceVMSizeTypes(string value) - { - return new ContainerServiceVMSizeTypes(value); - } - - /// Implicit operator to convert ContainerServiceVMSizeTypes to string - /// the value to convert to an instance of . - - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes e) - { - return e._value; - } - - /// Overriding != operator for enum ContainerServiceVMSizeTypes - /// the value to compare against - /// the value to compare against - /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes e2) - { - return !e2.Equals(e1); - } - - /// Overriding == operator for enum ContainerServiceVMSizeTypes - /// the value to compare against - /// the value to compare against - /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceVMSizeTypes e2) - { - return e2.Equals(e1); - } - } -} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.Completer.cs new file mode 100644 index 000000000000..2c973f497231 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.Completer.cs @@ -0,0 +1,47 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The type of identity that created the resource. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByTypeTypeConverter))] + public partial struct CreatedByType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "User".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'User'", "User", global::System.Management.Automation.CompletionResultType.ParameterValue, "User"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Application".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Application'", "Application", global::System.Management.Automation.CompletionResultType.ParameterValue, "Application"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedIdentity".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'ManagedIdentity'", "ManagedIdentity", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedIdentity"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Key".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Key'", "Key", global::System.Management.Automation.CompletionResultType.ParameterValue, "Key"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs similarity index 91% rename from src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs index babc24efc2fa..68730ecd8b26 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceVMSizeTypes.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.TypeConverter.cs @@ -6,8 +6,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Size of agent VMs. - public partial class ContainerServiceVMSizeTypesTypeConverter : + /// The type of identity that created the resource. + public partial class CreatedByTypeTypeConverter : global::System.Management.Automation.PSTypeConverter { @@ -44,9 +44,9 @@ public partial class ContainerServiceVMSizeTypesTypeConverter : /// 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) => ContainerServiceVMSizeTypes.CreateFrom(sourceValue); + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => CreatedByType.CreateFrom(sourceValue); /// NotImplemented -- this will return null /// the to convert from diff --git a/src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.cs b/src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.cs new file mode 100644 index 000000000000..9a22a9c5d169 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/CreatedByType.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.Support +{ + + /// The type of identity that created the resource. + public partial struct CreatedByType : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType Application = @"Application"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType Key = @"Key"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType ManagedIdentity = @"ManagedIdentity"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType User = @"User"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to CreatedByType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new CreatedByType(global::System.Convert.ToString(value)); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private CreatedByType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Compares values of enum type CreatedByType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type CreatedByType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is CreatedByType && Equals((CreatedByType)obj); + } + + /// Returns hashCode for enum CreatedByType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for CreatedByType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to CreatedByType + /// the value to convert to an instance of . + + public static implicit operator CreatedByType(string value) + { + return new CreatedByType(value); + } + + /// Implicit operator to convert CreatedByType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType e) + { + return e._value; + } + + /// Overriding != operator for enum CreatedByType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum CreatedByType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.CreatedByType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/Expander.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/Expander.Completer.cs index 4f4bca0b22ea..492a66faf4f4 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/Expander.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/Expander.Completer.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Argument completer implementation for Expander. + /// + /// 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. + /// [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExpanderTypeConverter))] public partial struct Expander : System.Management.Automation.IArgumentCompleter @@ -34,6 +37,10 @@ public partial struct Expander : { yield return new global::System.Management.Automation.CompletionResult("'most-pods'", "most-pods", global::System.Management.Automation.CompletionResultType.ParameterValue, "most-pods"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "priority".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'priority'", "priority", global::System.Management.Automation.CompletionResultType.ParameterValue, "priority"); + } if (global::System.String.IsNullOrEmpty(wordToComplete) || "random".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { yield return new global::System.Management.Automation.CompletionResult("'random'", "random", global::System.Management.Automation.CompletionResultType.ParameterValue, "random"); diff --git a/src/Aks/Aks.Autorest/generated/api/Support/Expander.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/Expander.TypeConverter.cs index dfe958c46469..52cf4b26842f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/Expander.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/Expander.TypeConverter.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// TypeConverter implementation for Expander. + /// + /// 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. + /// public partial class ExpanderTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/Expander.cs b/src/Aks/Aks.Autorest/generated/api/Support/Expander.cs index a3ead1b74a0c..207dd54f5d21 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/Expander.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/Expander.cs @@ -6,13 +6,36 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { + /// + /// 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. + /// public partial struct Expander : System.IEquatable { + /// + /// Selects the node group that will have the least idle CPU (if tied, unused memory) after scale-up. This is useful when + /// you have different classes of nodes, for example, high CPU or high memory nodes, and only want to expand those when there + /// are pending pods that need a lot of those resources. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander LeastWaste = @"least-waste"; + /// + /// Selects the node group that would be able to schedule the most pods when scaling up. This is useful when you are using + /// nodeSelector to make sure certain pods land on certain nodes. Note that this won't cause the autoscaler to select bigger + /// nodes vs. smaller, as it can add multiple smaller nodes at once. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander MostPods = @"most-pods"; + /// + /// Selects the node group that has the highest priority assigned by the user. It's configuration is described in more details + /// [here](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md). + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander Priority = @"priority"; + + /// + /// Used when you don't have a particular need for the node groups to scale differently. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Expander Random = @"random"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.Completer.cs new file mode 100644 index 000000000000..07116423287e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.Completer.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.Support +{ + + /// The type of extendedLocation. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypesTypeConverter))] + public partial struct ExtendedLocationTypes : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "EdgeZone".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'EdgeZone'", "EdgeZone", global::System.Management.Automation.CompletionResultType.ParameterValue, "EdgeZone"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.TypeConverter.cs new file mode 100644 index 000000000000..6b43a94eeb2d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The type of extendedLocation. + public partial class ExtendedLocationTypesTypeConverter : + 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) => true; + + /// + /// 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 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) => ExtendedLocationTypes.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.cs b/src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.cs new file mode 100644 index 000000000000..e46be54c175f --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/ExtendedLocationTypes.cs @@ -0,0 +1,96 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The type of extendedLocation. + public partial struct ExtendedLocationTypes : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes EdgeZone = @"EdgeZone"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ExtendedLocationTypes + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ExtendedLocationTypes(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ExtendedLocationTypes + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ExtendedLocationTypes (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ExtendedLocationTypes && Equals((ExtendedLocationTypes)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ExtendedLocationTypes(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns hashCode for enum ExtendedLocationTypes + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for ExtendedLocationTypes + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ExtendedLocationTypes + /// the value to convert to an instance of . + + public static implicit operator ExtendedLocationTypes(string value) + { + return new ExtendedLocationTypes(value); + } + + /// Implicit operator to convert ExtendedLocationTypes to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes e) + { + return e._value; + } + + /// Overriding != operator for enum ExtendedLocationTypes + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ExtendedLocationTypes + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ExtendedLocationTypes e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/Format.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/Format.Completer.cs new file mode 100644 index 000000000000..cfa44590f8cf --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/Format.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// Argument completer implementation for Format. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.FormatTypeConverter))] + public partial struct Format : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "azure".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'azure'", "azure", global::System.Management.Automation.CompletionResultType.ParameterValue, "azure"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "exec".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'exec'", "exec", global::System.Management.Automation.CompletionResultType.ParameterValue, "exec"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/Format.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/Format.TypeConverter.cs new file mode 100644 index 000000000000..4ece5cd82b25 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/Format.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// TypeConverter implementation for Format. + public partial class FormatTypeConverter : + 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) => true; + + /// + /// 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 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) => Format.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceStorageProfileTypes.cs b/src/Aks/Aks.Autorest/generated/api/Support/Format.cs similarity index 51% rename from src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceStorageProfileTypes.cs rename to src/Aks/Aks.Autorest/generated/api/Support/Format.cs index 16456b95976b..6d5cc2a8a08c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceStorageProfileTypes.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/Format.cs @@ -6,100 +6,96 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// - /// Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - /// choose for you based on the orchestrator choice. - /// - public partial struct ContainerServiceStorageProfileTypes : - System.IEquatable + public partial struct Format : + System.IEquatable { - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes ManagedDisks = @"ManagedDisks"; - - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes StorageAccount = @"StorageAccount"; - /// - /// the value for an instance of the Enum. + /// Return azure auth-provider kubeconfig. This format is deprecated in v1.22 and will be fully removed in v1.26. See: https://aka.ms/k8s/changes-1-26. /// - private string _value { get; set; } + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format Azure = @"azure"; /// - /// Creates an instance of the Enum class. + /// Return exec format kubeconfig. This format requires kubelogin binary in the path. /// - /// the value to create an instance for. - private ContainerServiceStorageProfileTypes(string underlyingValue) - { - this._value = underlyingValue; - } + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format Exec = @"exec"; + + /// the value for an instance of the Enum. + private string _value { get; set; } - /// Conversion from arbitrary object to ContainerServiceStorageProfileTypes - /// the value to convert to an instance of . + /// Conversion from arbitrary object to Format + /// the value to convert to an instance of . internal static object CreateFrom(object value) { - return new ContainerServiceStorageProfileTypes(global::System.Convert.ToString(value)); + return new Format(global::System.Convert.ToString(value)); } - /// Compares values of enum type ContainerServiceStorageProfileTypes + /// Compares values of enum type Format /// the value to compare against this instance. /// true if the two instances are equal to the same value - public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes e) + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format e) { return _value.Equals(e._value); } - /// - /// Compares values of enum type ContainerServiceStorageProfileTypes (override for Object) - /// + /// Compares values of enum type Format (override for Object) /// the value to compare against this instance. /// true if the two instances are equal to the same value public override bool Equals(object obj) { - return obj is ContainerServiceStorageProfileTypes && Equals((ContainerServiceStorageProfileTypes)obj); + return obj is Format && Equals((Format)obj); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Format(string underlyingValue) + { + this._value = underlyingValue; } - /// Returns hashCode for enum ContainerServiceStorageProfileTypes + /// Returns hashCode for enum Format /// The hashCode of the value public override int GetHashCode() { return this._value.GetHashCode(); } - /// Returns string representation for ContainerServiceStorageProfileTypes + /// Returns string representation for Format /// A string for this value. public override string ToString() { return this._value; } - /// Implicit operator to convert string to ContainerServiceStorageProfileTypes - /// the value to convert to an instance of . + /// Implicit operator to convert string to Format + /// the value to convert to an instance of . - public static implicit operator ContainerServiceStorageProfileTypes(string value) + public static implicit operator Format(string value) { - return new ContainerServiceStorageProfileTypes(value); + return new Format(value); } - /// Implicit operator to convert ContainerServiceStorageProfileTypes to string - /// the value to convert to an instance of . + /// Implicit operator to convert Format to string + /// the value to convert to an instance of . - public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes e) + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format e) { return e._value; } - /// Overriding != operator for enum ContainerServiceStorageProfileTypes + /// Overriding != operator for enum Format /// the value to compare against /// the value to compare against /// true if the two instances are not equal to the same value - public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes e2) + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format e2) { return !e2.Equals(e1); } - /// Overriding == operator for enum ContainerServiceStorageProfileTypes + /// Overriding == operator for enum Format /// the value to compare against /// the value to compare against /// true if the two instances are equal to the same value - public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypes e2) + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Format e2) { return e2.Equals(e1); } diff --git a/src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.Completer.cs new file mode 100644 index 000000000000..5b1f62a72fe2 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.Completer.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.Support +{ + + /// + /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfileTypeConverter))] + public partial struct GpuInstanceProfile : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MIG1g".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MIG1g'", "MIG1g", global::System.Management.Automation.CompletionResultType.ParameterValue, "MIG1g"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MIG2g".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MIG2g'", "MIG2g", global::System.Management.Automation.CompletionResultType.ParameterValue, "MIG2g"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MIG3g".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MIG3g'", "MIG3g", global::System.Management.Automation.CompletionResultType.ParameterValue, "MIG3g"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MIG4g".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MIG4g'", "MIG4g", global::System.Management.Automation.CompletionResultType.ParameterValue, "MIG4g"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "MIG7g".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'MIG7g'", "MIG7g", global::System.Management.Automation.CompletionResultType.ParameterValue, "MIG7g"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceStorageProfileTypes.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.TypeConverter.cs similarity index 87% rename from src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceStorageProfileTypes.TypeConverter.cs rename to src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.TypeConverter.cs index 210b31ce2e38..e29781b890d8 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceStorageProfileTypes.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.TypeConverter.cs @@ -7,10 +7,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { /// - /// Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - /// choose for you based on the orchestrator choice. + /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. /// - public partial class ContainerServiceStorageProfileTypesTypeConverter : + public partial class GpuInstanceProfileTypeConverter : global::System.Management.Automation.PSTypeConverter { @@ -47,9 +46,9 @@ public partial class ContainerServiceStorageProfileTypesTypeConverter : /// 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) => ContainerServiceStorageProfileTypes.CreateFrom(sourceValue); + public override object ConvertFrom(object sourceValue, global::System.Type destinationType, global::System.IFormatProvider formatProvider, bool ignoreCase) => GpuInstanceProfile.CreateFrom(sourceValue); /// NotImplemented -- this will return null /// the to convert from diff --git a/src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.cs b/src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.cs new file mode 100644 index 000000000000..2f3591a364fd --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/GpuInstanceProfile.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.Support +{ + + /// + /// GPUInstanceProfile to be used to specify GPU MIG instance profile for supported GPU VM SKU. + /// + public partial struct GpuInstanceProfile : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile Mig1G = @"MIG1g"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile Mig2G = @"MIG2g"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile Mig3G = @"MIG3g"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile Mig4G = @"MIG4g"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile Mig7G = @"MIG7g"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to GpuInstanceProfile + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new GpuInstanceProfile(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type GpuInstanceProfile + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type GpuInstanceProfile (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is GpuInstanceProfile && Equals((GpuInstanceProfile)obj); + } + + /// Returns hashCode for enum GpuInstanceProfile + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private GpuInstanceProfile(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for GpuInstanceProfile + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to GpuInstanceProfile + /// the value to convert to an instance of . + + public static implicit operator GpuInstanceProfile(string value) + { + return new GpuInstanceProfile(value); + } + + /// Implicit operator to convert GpuInstanceProfile to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile e) + { + return e._value; + } + + /// Overriding != operator for enum GpuInstanceProfile + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum GpuInstanceProfile + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.GpuInstanceProfile e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/IPFamily.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/IPFamily.Completer.cs new file mode 100644 index 000000000000..2b7dab53f526 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/IPFamily.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The IP version to use for cluster networking and IP assignment. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamilyTypeConverter))] + public partial struct IPFamily : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IPv4".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IPv4'", "IPv4", global::System.Management.Automation.CompletionResultType.ParameterValue, "IPv4"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "IPv6".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'IPv6'", "IPv6", global::System.Management.Automation.CompletionResultType.ParameterValue, "IPv6"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/IPFamily.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/IPFamily.TypeConverter.cs new file mode 100644 index 000000000000..952b2348cf53 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/IPFamily.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The IP version to use for cluster networking and IP assignment. + public partial class IPFamilyTypeConverter : + 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) => true; + + /// + /// 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 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) => IPFamily.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/IPFamily.cs b/src/Aks/Aks.Autorest/generated/api/Support/IPFamily.cs new file mode 100644 index 000000000000..d2d6be6356bd --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/IPFamily.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The IP version to use for cluster networking and IP assignment. + public partial struct IPFamily : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily IPv4 = @"IPv4"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily IPv6 = @"IPv6"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to IPFamily + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new IPFamily(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type IPFamily + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type IPFamily (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is IPFamily && Equals((IPFamily)obj); + } + + /// Returns hashCode for enum IPFamily + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private IPFamily(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for IPFamily + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to IPFamily + /// the value to convert to an instance of . + + public static implicit operator IPFamily(string value) + { + return new IPFamily(value); + } + + /// Implicit operator to convert IPFamily to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily e) + { + return e._value; + } + + /// Overriding != operator for enum IPFamily + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum IPFamily + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.IPFamily e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.Completer.cs new file mode 100644 index 000000000000..ce441393fdbe --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.Completer.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// + /// 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`. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypesTypeConverter))] + public partial struct KeyVaultNetworkAccessTypes : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Public".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Public'", "Public", global::System.Management.Automation.CompletionResultType.ParameterValue, "Public"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Private".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Private'", "Private", global::System.Management.Automation.CompletionResultType.ParameterValue, "Private"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.TypeConverter.cs new file mode 100644 index 000000000000..db7cf1a1ae09 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.TypeConverter.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.Support +{ + + /// + /// 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`. + /// + public partial class KeyVaultNetworkAccessTypesTypeConverter : + 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) => true; + + /// + /// 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 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) => KeyVaultNetworkAccessTypes.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.cs b/src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.cs new file mode 100644 index 000000000000..49819b6db452 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/KeyVaultNetworkAccessTypes.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.Support +{ + + /// + /// 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`. + /// + public partial struct KeyVaultNetworkAccessTypes : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes Private = @"Private"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes Public = @"Public"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to KeyVaultNetworkAccessTypes + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new KeyVaultNetworkAccessTypes(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type KeyVaultNetworkAccessTypes + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type KeyVaultNetworkAccessTypes (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is KeyVaultNetworkAccessTypes && Equals((KeyVaultNetworkAccessTypes)obj); + } + + /// Returns hashCode for enum KeyVaultNetworkAccessTypes + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private KeyVaultNetworkAccessTypes(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for KeyVaultNetworkAccessTypes + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to KeyVaultNetworkAccessTypes + /// the value to convert to an instance of . + + public static implicit operator KeyVaultNetworkAccessTypes(string value) + { + return new KeyVaultNetworkAccessTypes(value); + } + + /// Implicit operator to convert KeyVaultNetworkAccessTypes to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes e) + { + return e._value; + } + + /// Overriding != operator for enum KeyVaultNetworkAccessTypes + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum KeyVaultNetworkAccessTypes + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KeyVaultNetworkAccessTypes e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.Completer.cs new file mode 100644 index 000000000000..b3500f7a1b36 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.Completer.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// + /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskTypeTypeConverter))] + public partial struct KubeletDiskType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "OS".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'OS'", "OS", global::System.Management.Automation.CompletionResultType.ParameterValue, "OS"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Temporary".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Temporary'", "Temporary", global::System.Management.Automation.CompletionResultType.ParameterValue, "Temporary"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.TypeConverter.cs new file mode 100644 index 000000000000..bf5d5e798232 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// + /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + /// + public partial class KubeletDiskTypeTypeConverter : + 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) => true; + + /// + /// 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 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) => KubeletDiskType.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.cs b/src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.cs new file mode 100644 index 000000000000..3cc86911cb26 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/KubeletDiskType.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.Support +{ + + /// + /// Determines the placement of emptyDir volumes, container runtime data root, and Kubelet ephemeral storage. + /// + public partial struct KubeletDiskType : + System.IEquatable + { + /// Kubelet will use the OS disk for its data. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType OS = @"OS"; + + /// Kubelet will use the temporary disk for its data. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType Temporary = @"Temporary"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to KubeletDiskType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new KubeletDiskType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type KubeletDiskType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type KubeletDiskType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is KubeletDiskType && Equals((KubeletDiskType)obj); + } + + /// Returns hashCode for enum KubeletDiskType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private KubeletDiskType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for KubeletDiskType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to KubeletDiskType + /// the value to convert to an instance of . + + public static implicit operator KubeletDiskType(string value) + { + return new KubeletDiskType(value); + } + + /// Implicit operator to convert KubeletDiskType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType e) + { + return e._value; + } + + /// Overriding != operator for enum KubeletDiskType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum KubeletDiskType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.KubeletDiskType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.Completer.cs index 3aaab58e4b79..def79a75b0ec 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.Completer.cs @@ -7,7 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. /// [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseTypeTypeConverter))] public partial struct LicenseType : diff --git a/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.TypeConverter.cs index 3f064b0515dd..d61f224c4062 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.TypeConverter.cs @@ -7,7 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. /// public partial class LicenseTypeTypeConverter : global::System.Management.Automation.PSTypeConverter diff --git a/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.cs b/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.cs index 9b460d09068f..6c319ed3fee0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/LicenseType.cs @@ -7,13 +7,16 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { /// - /// The licenseType to use for Windows VMs. Windows_Server is used to enable Azure Hybrid User Benefits for Windows VMs. + /// The license type to use for Windows VMs. See [Azure Hybrid User Benefits](https://azure.microsoft.com/pricing/hybrid-benefit/faq/) + /// for more details. /// public partial struct LicenseType : System.IEquatable { + /// No additional licensing is applied. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType None = @"None"; + /// Enables Azure Hybrid User Benefits for Windows VMs. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LicenseType WindowsServer = @"Windows_Server"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.Completer.cs index 770cbc34a60e..88e6cb5145aa 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.Completer.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// 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. + /// [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSkuTypeConverter))] public partial struct LoadBalancerSku : System.Management.Automation.IArgumentCompleter diff --git a/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.TypeConverter.cs index 67c407b9ccff..e75ce332844e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.TypeConverter.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// 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. + /// public partial class LoadBalancerSkuTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.cs b/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.cs index 0c9aadd57b83..2c381c93c148 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/LoadBalancerSku.cs @@ -6,12 +6,21 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// 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. + /// public partial struct LoadBalancerSku : System.IEquatable { + /// Use a basic Load Balancer with limited functionality. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku Basic = @"basic"; + /// + /// Use a a standard Load Balancer. This is the recommended Load Balancer SKU. For more information about on working with + /// the load balancer in the managed cluster, see the [standard Load Balancer](https://docs.microsoft.com/azure/aks/load-balancer-standard) + /// article. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.LoadBalancerSku Standard = @"standard"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.Completer.cs new file mode 100644 index 000000000000..a65b38708280 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.Completer.cs @@ -0,0 +1,55 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The current provisioning state of the pod identity. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningStateTypeConverter))] + public partial struct ManagedClusterPodIdentityProvisioningState : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Assigned".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Assigned'", "Assigned", global::System.Management.Automation.CompletionResultType.ParameterValue, "Assigned"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deleting".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deleting'", "Deleting", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deleting"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Failed".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Updating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Updating'", "Updating", global::System.Management.Automation.CompletionResultType.ParameterValue, "Updating"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.TypeConverter.cs new file mode 100644 index 000000000000..c5368b6cc883 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The current provisioning state of the pod identity. + public partial class ManagedClusterPodIdentityProvisioningStateTypeConverter : + 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) => true; + + /// + /// 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 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) => ManagedClusterPodIdentityProvisioningState.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.cs b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.cs new file mode 100644 index 000000000000..10a7f4ec5339 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterPodIdentityProvisioningState.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.Support +{ + + /// The current provisioning state of the pod identity. + public partial struct ManagedClusterPodIdentityProvisioningState : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState Assigned = @"Assigned"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState Canceled = @"Canceled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState Deleting = @"Deleting"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState Failed = @"Failed"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState Succeeded = @"Succeeded"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState Updating = @"Updating"; + + /// + /// the value for an instance of the Enum. + /// + private string _value { get; set; } + + /// Conversion from arbitrary object to ManagedClusterPodIdentityProvisioningState + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ManagedClusterPodIdentityProvisioningState(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ManagedClusterPodIdentityProvisioningState + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState e) + { + return _value.Equals(e._value); + } + + /// + /// Compares values of enum type ManagedClusterPodIdentityProvisioningState (override for Object) + /// + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ManagedClusterPodIdentityProvisioningState && Equals((ManagedClusterPodIdentityProvisioningState)obj); + } + + /// Returns hashCode for enum ManagedClusterPodIdentityProvisioningState + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// + /// Creates an instance of the Enum class. + /// + /// the value to create an instance for. + private ManagedClusterPodIdentityProvisioningState(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ManagedClusterPodIdentityProvisioningState + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// + /// Implicit operator to convert string to ManagedClusterPodIdentityProvisioningState + /// + /// the value to convert to an instance of . + + public static implicit operator ManagedClusterPodIdentityProvisioningState(string value) + { + return new ManagedClusterPodIdentityProvisioningState(value); + } + + /// + /// Implicit operator to convert ManagedClusterPodIdentityProvisioningState to string + /// + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState e) + { + return e._value; + } + + /// Overriding != operator for enum ManagedClusterPodIdentityProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ManagedClusterPodIdentityProvisioningState + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterPodIdentityProvisioningState e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.Completer.cs index fac995fe7637..0a809e6ad46e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Name of a managed cluster SKU. + /// The name of a managed cluster SKU. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuNameTypeConverter))] public partial struct ManagedClusterSkuName : System.Management.Automation.IArgumentCompleter @@ -26,9 +26,9 @@ public partial struct ManagedClusterSkuName : /// public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Basic".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Base".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { - yield return new global::System.Management.Automation.CompletionResult("'Basic'", "Basic", global::System.Management.Automation.CompletionResultType.ParameterValue, "Basic"); + yield return new global::System.Management.Automation.CompletionResult("'Base'", "Base", global::System.Management.Automation.CompletionResultType.ParameterValue, "Base"); } } } diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.TypeConverter.cs index 17a769fdd8d0..574b7aa5791c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Name of a managed cluster SKU. + /// The name of a managed cluster SKU. public partial class ManagedClusterSkuNameTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.cs b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.cs index b774ba2e2371..b9e6f9c4d76e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuName.cs @@ -6,11 +6,12 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Name of a managed cluster SKU. + /// The name of a managed cluster SKU. public partial struct ManagedClusterSkuName : System.IEquatable { - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName Basic = @"Basic"; + /// Base option for the AKS control plane. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuName Base = @"Base"; /// the value for an instance of the Enum. private string _value { get; set; } diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.Completer.cs index 25340bcb6188..3cf6612028ed 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.Completer.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// 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. + /// [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTierTypeConverter))] public partial struct ManagedClusterSkuTier : System.Management.Automation.IArgumentCompleter @@ -26,9 +29,9 @@ public partial struct ManagedClusterSkuTier : /// public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Paid".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Standard".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { - yield return new global::System.Management.Automation.CompletionResult("'Paid'", "Paid", global::System.Management.Automation.CompletionResultType.ParameterValue, "Paid"); + yield return new global::System.Management.Automation.CompletionResult("'Standard'", "Standard", global::System.Management.Automation.CompletionResultType.ParameterValue, "Standard"); } if (global::System.String.IsNullOrEmpty(wordToComplete) || "Free".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.TypeConverter.cs index d04c9f2aeb34..dedc747a54f8 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.TypeConverter.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// 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. + /// public partial class ManagedClusterSkuTierTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.cs b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.cs index e6a68b1b2e17..273b9d49335a 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ManagedClusterSkuTier.cs @@ -6,13 +6,25 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// 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. + /// public partial struct ManagedClusterSkuTier : System.IEquatable { + /// + /// The cluster management is free, but charged for VM, storage, and networking usage. Best for experimenting, learning, simple + /// testing, or workloads with fewer than 10 nodes. Not recommended for production use cases. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier Free = @"Free"; - public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier Paid = @"Paid"; + /// + /// Recommended for mission-critical and production workloads. Includes Kubernetes control plane autoscaling, workload-intensive + /// testing, and up to 5,000 nodes per cluster. Guarantees 99.95% availability of the Kubernetes API server endpoint for clusters + /// that use Availability Zones and 99.9% of availability for clusters that don't use Availability Zones. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ManagedClusterSkuTier Standard = @"Standard"; /// the value for an instance of the Enum. private string _value { get; set; } diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.Completer.cs new file mode 100644 index 000000000000..cad8a99fc2f4 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// Network dataplane used in the Kubernetes cluster. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplaneTypeConverter))] + public partial struct NetworkDataplane : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "azure".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'azure'", "azure", global::System.Management.Automation.CompletionResultType.ParameterValue, "azure"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "cilium".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'cilium'", "cilium", global::System.Management.Automation.CompletionResultType.ParameterValue, "cilium"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.TypeConverter.cs new file mode 100644 index 000000000000..554915f92c14 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// Network dataplane used in the Kubernetes cluster. + public partial class NetworkDataplaneTypeConverter : + 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) => true; + + /// + /// 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 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) => NetworkDataplane.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.cs new file mode 100644 index 000000000000..739b9ab8207d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkDataplane.cs @@ -0,0 +1,103 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// Network dataplane used in the Kubernetes cluster. + public partial struct NetworkDataplane : + System.IEquatable + { + /// Use Azure network dataplane. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane Azure = @"azure"; + + /// + /// Use Cilium network dataplane. See [Azure CNI Powered by Cilium](https://learn.microsoft.com/azure/aks/azure-cni-powered-by-cilium) + /// for more information. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane Cilium = @"cilium"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to NetworkDataplane + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new NetworkDataplane(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type NetworkDataplane + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type NetworkDataplane (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is NetworkDataplane && Equals((NetworkDataplane)obj); + } + + /// Returns hashCode for enum NetworkDataplane + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private NetworkDataplane(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for NetworkDataplane + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to NetworkDataplane + /// the value to convert to an instance of . + + public static implicit operator NetworkDataplane(string value) + { + return new NetworkDataplane(value); + } + + /// Implicit operator to convert NetworkDataplane to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane e) + { + return e._value; + } + + /// Overriding != operator for enum NetworkDataplane + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum NetworkDataplane + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkDataplane e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.Completer.cs index 83bfd6e641bd..32edecf53d27 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Network mode used for building Kubernetes network. + /// This cannot be specified if networkPlugin is anything other than 'azure'. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkModeTypeConverter))] public partial struct NetworkMode : System.Management.Automation.IArgumentCompleter diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.TypeConverter.cs index 35fd6fbdcec0..5d28c524d5cf 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Network mode used for building Kubernetes network. + /// This cannot be specified if networkPlugin is anything other than 'azure'. public partial class NetworkModeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.cs index ac91819a2aa2..98b86e05d567 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkMode.cs @@ -6,12 +6,17 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Network mode used for building Kubernetes network. + /// This cannot be specified if networkPlugin is anything other than 'azure'. public partial struct NetworkMode : System.IEquatable { + /// This is no longer supported public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode Bridge = @"bridge"; + /// + /// No bridge is created. Intra-VM Pod to Pod communication is through IP routes created by Azure CNI. See [Transparent Mode](https://docs.microsoft.com/azure/aks/faq#transparent-mode) + /// for more information. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkMode Transparent = @"transparent"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.Completer.cs index 8c1054e1ec4a..7a84fb45e84b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Network plugin used for building Kubernetes network. + /// Network plugin used for building the Kubernetes network. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginTypeConverter))] public partial struct NetworkPlugin : System.Management.Automation.IArgumentCompleter @@ -34,6 +34,10 @@ public partial struct NetworkPlugin : { yield return new global::System.Management.Automation.CompletionResult("'kubenet'", "kubenet", global::System.Management.Automation.CompletionResultType.ParameterValue, "kubenet"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "none".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'none'", "none", global::System.Management.Automation.CompletionResultType.ParameterValue, "none"); + } } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.TypeConverter.cs index 717172462c52..50fc71c0d0bb 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Network plugin used for building Kubernetes network. + /// Network plugin used for building the Kubernetes network. public partial class NetworkPluginTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.cs index d13950a309e1..6f6be0decc1d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPlugin.cs @@ -6,14 +6,27 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Network plugin used for building Kubernetes network. + /// Network plugin used for building the Kubernetes network. public partial struct NetworkPlugin : System.IEquatable { + /// + /// Use the Azure CNI network plugin. See [Azure CNI (advanced) networking](https://docs.microsoft.com/azure/aks/concepts-network#azure-cni-advanced-networking) + /// for more information. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin Azure = @"azure"; + /// + /// Use the Kubenet network plugin. See [Kubenet (basic) networking](https://docs.microsoft.com/azure/aks/concepts-network#kubenet-basic-networking) + /// for more information. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin Kubenet = @"kubenet"; + /// + /// No CNI plugin is pre-installed. See [BYO CNI](https://docs.microsoft.com/en-us/azure/aks/use-byo-cni) for more information. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPlugin None = @"none"; + /// the value for an instance of the Enum. private string _value { get; set; } diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.Completer.cs new file mode 100644 index 000000000000..606551ecc89c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.Completer.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.Support +{ + + /// The mode the network plugin should use. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginModeTypeConverter))] + public partial struct NetworkPluginMode : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "overlay".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'overlay'", "overlay", global::System.Management.Automation.CompletionResultType.ParameterValue, "overlay"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.TypeConverter.cs new file mode 100644 index 000000000000..fa7677f09061 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The mode the network plugin should use. + public partial class NetworkPluginModeTypeConverter : + 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) => true; + + /// + /// 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 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) => NetworkPluginMode.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.cs new file mode 100644 index 000000000000..45967eb3e071 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPluginMode.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.Support +{ + + /// The mode the network plugin should use. + public partial struct NetworkPluginMode : + System.IEquatable + { + /// + /// Used with networkPlugin=azure, pods are given IPs from the PodCIDR address space but use Azure Routing Domains rather + /// than Kubenet's method of route tables. For more information visit https://aka.ms/aks/azure-cni-overlay. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode Overlay = @"overlay"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to NetworkPluginMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new NetworkPluginMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type NetworkPluginMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type NetworkPluginMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is NetworkPluginMode && Equals((NetworkPluginMode)obj); + } + + /// Returns hashCode for enum NetworkPluginMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private NetworkPluginMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for NetworkPluginMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to NetworkPluginMode + /// the value to convert to an instance of . + + public static implicit operator NetworkPluginMode(string value) + { + return new NetworkPluginMode(value); + } + + /// Implicit operator to convert NetworkPluginMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode e) + { + return e._value; + } + + /// Overriding != operator for enum NetworkPluginMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum NetworkPluginMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPluginMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.Completer.cs index 640d457cf949..1751de648650 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.Completer.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Network policy used for building Kubernetes network. + /// Network policy used for building the Kubernetes network. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicyTypeConverter))] public partial struct NetworkPolicy : System.Management.Automation.IArgumentCompleter @@ -34,6 +34,10 @@ public partial struct NetworkPolicy : { yield return new global::System.Management.Automation.CompletionResult("'azure'", "azure", global::System.Management.Automation.CompletionResultType.ParameterValue, "azure"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "cilium".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'cilium'", "cilium", global::System.Management.Automation.CompletionResultType.ParameterValue, "cilium"); + } } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.TypeConverter.cs index 64cb3e707c5a..bae0a20c6635 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.TypeConverter.cs @@ -6,7 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Network policy used for building Kubernetes network. + /// Network policy used for building the Kubernetes network. public partial class NetworkPolicyTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.cs b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.cs index 71a3d3de1b55..2cf4e8903208 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/NetworkPolicy.cs @@ -6,14 +6,27 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// Network policy used for building Kubernetes network. + /// Network policy used for building the Kubernetes network. public partial struct NetworkPolicy : System.IEquatable { + /// + /// Use Azure network policies. See [differences between Azure and Calico policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) + /// for more information. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy Azure = @"azure"; + /// + /// Use Calico network policies. See [differences between Azure and Calico policies](https://docs.microsoft.com/azure/aks/use-network-policies#differences-between-azure-and-calico-policies-and-their-capabilities) + /// for more information. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy Calico = @"calico"; + /// + /// Use Cilium to enforce network policies. This requires networkDataplane to be 'cilium'. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.NetworkPolicy Cilium = @"cilium"; + /// the value for an instance of the Enum. private string _value { get; set; } diff --git a/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.Completer.cs index 3a25e5bf9d84..2d32bed8416d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.Completer.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// OSDiskType represents the type of an OS disk on an 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). + /// [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskTypeTypeConverter))] public partial struct OSDiskType : System.Management.Automation.IArgumentCompleter diff --git a/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.TypeConverter.cs index 1a1a5081b083..73bd8bb5e54f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.TypeConverter.cs @@ -6,7 +6,10 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// OSDiskType represents the type of an OS disk on an 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). + /// public partial class OSDiskTypeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.cs b/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.cs index bf2df128555d..d9b7afe3d38c 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/OSDiskType.cs @@ -6,12 +6,24 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// OSDiskType represents the type of an OS disk on an 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). + /// public partial struct OSDiskType : System.IEquatable { + /// + /// Ephemeral OS disks are stored only on the host machine, just like a temporary disk. This provides lower read/write latency, + /// along with faster node scaling and cluster upgrades. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType Ephemeral = @"Ephemeral"; + /// + /// Azure replicates the operating system disk for a virtual machine to Azure storage to avoid data loss should the VM need + /// to be relocated to another host. Since containers aren't designed to have local state persisted, this behavior offers + /// limited value while providing some drawbacks, including slower node provisioning and higher read/write latency. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSDiskType Managed = @"Managed"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/OSType.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/OSType.Completer.cs index 88de1ee79d25..ba1fb0b88a7e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/OSType.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/OSType.Completer.cs @@ -6,9 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSTypeTypeConverter))] public partial struct OSType : System.Management.Automation.IArgumentCompleter diff --git a/src/Aks/Aks.Autorest/generated/api/Support/OSType.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/OSType.TypeConverter.cs index 5113d994c759..4546efca3da3 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/OSType.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/OSType.TypeConverter.cs @@ -6,9 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. public partial class OSTypeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/OSType.cs b/src/Aks/Aks.Autorest/generated/api/Support/OSType.cs index d7948ba73e93..2f33019c2b9e 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/OSType.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/OSType.cs @@ -6,14 +6,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// - /// OsType to be used to specify os type. Choose from Linux and Windows. Default to Linux. - /// + /// The operating system type. The default is Linux. public partial struct OSType : System.IEquatable { + /// Use Linux. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType Linux = @"Linux"; + /// Use Windows. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OSType Windows = @"Windows"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/Ossku.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/Ossku.Completer.cs new file mode 100644 index 000000000000..6ace6d683ba0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/Ossku.Completer.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// + /// 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. + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OsskuTypeConverter))] + public partial struct Ossku : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Ubuntu".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Ubuntu'", "Ubuntu", global::System.Management.Automation.CompletionResultType.ParameterValue, "Ubuntu"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "CBLMariner".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'CBLMariner'", "CBLMariner", global::System.Management.Automation.CompletionResultType.ParameterValue, "CBLMariner"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Windows2019".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Windows2019'", "Windows2019", global::System.Management.Automation.CompletionResultType.ParameterValue, "Windows2019"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Windows2022".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Windows2022'", "Windows2022", global::System.Management.Automation.CompletionResultType.ParameterValue, "Windows2022"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/Ossku.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/Ossku.TypeConverter.cs new file mode 100644 index 000000000000..8f7248146ec0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/Ossku.TypeConverter.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.Support +{ + + /// + /// 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. + /// + public partial class OsskuTypeConverter : + 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) => true; + + /// + /// 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 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) => Ossku.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/Ossku.cs b/src/Aks/Aks.Autorest/generated/api/Support/Ossku.cs new file mode 100644 index 000000000000..cb4858a03ba1 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/Ossku.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.Support +{ + + /// + /// 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. + /// + public partial struct Ossku : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku CblMariner = @"CBLMariner"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku Ubuntu = @"Ubuntu"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku Windows2019 = @"Windows2019"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku Windows2022 = @"Windows2022"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to Ossku + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new Ossku(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type Ossku + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type Ossku (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is Ossku && Equals((Ossku)obj); + } + + /// Returns hashCode for enum Ossku + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private Ossku(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for Ossku + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to Ossku + /// the value to convert to an instance of . + + public static implicit operator Ossku(string value) + { + return new Ossku(value); + } + + /// Implicit operator to convert Ossku to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku e) + { + return e._value; + } + + /// Overriding != operator for enum Ossku + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum Ossku + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.Ossku e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.Completer.cs index d2fddb90cc1b..fe34b75017d2 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.Completer.cs @@ -6,7 +6,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// 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). + /// [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundTypeTypeConverter))] public partial struct OutboundType : System.Management.Automation.IArgumentCompleter @@ -34,6 +36,14 @@ public partial struct OutboundType : { yield return new global::System.Management.Automation.CompletionResult("'userDefinedRouting'", "userDefinedRouting", global::System.Management.Automation.CompletionResultType.ParameterValue, "userDefinedRouting"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "managedNATGateway".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'managedNATGateway'", "managedNATGateway", global::System.Management.Automation.CompletionResultType.ParameterValue, "managedNATGateway"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "userAssignedNATGateway".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'userAssignedNATGateway'", "userAssignedNATGateway", global::System.Management.Automation.CompletionResultType.ParameterValue, "userAssignedNATGateway"); + } } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.TypeConverter.cs index 1eabb91652d7..3493683b59de 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.TypeConverter.cs @@ -6,7 +6,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// 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). + /// public partial class OutboundTypeTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.cs b/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.cs index 9b25a9f88eed..3f7b81d96835 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/OutboundType.cs @@ -6,12 +6,31 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// 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). + /// public partial struct OutboundType : System.IEquatable { + /// + /// The load balancer is used for egress through an AKS assigned public IP. This supports Kubernetes services of type 'loadBalancer'. + /// For more information see [outbound type loadbalancer](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-loadbalancer). + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType LoadBalancer = @"loadBalancer"; + /// The AKS-managed NAT gateway is used for egress. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType ManagedNatGateway = @"managedNATGateway"; + + /// + /// The user-assigned NAT gateway associated to the cluster subnet is used for egress. This is an advanced scenario and requires + /// proper network configuration. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType UserAssignedNatGateway = @"userAssignedNATGateway"; + + /// + /// Egress paths must be defined by the user. This is an advanced scenario and requires proper network configuration. For + /// more information see [outbound type userDefinedRouting](https://docs.microsoft.com/azure/aks/egress-outboundtype#outbound-type-of-userdefinedrouting). + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.OutboundType UserDefinedRouting = @"userDefinedRouting"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.Completer.cs index b5a4c2777724..fb5c63ec08c6 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.Completer.cs @@ -26,9 +26,9 @@ public partial struct PrivateEndpointConnectionProvisioningState : /// public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Canceled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { - yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + yield return new global::System.Management.Automation.CompletionResult("'Canceled'", "Canceled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Canceled"); } if (global::System.String.IsNullOrEmpty(wordToComplete) || "Creating".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { @@ -42,6 +42,10 @@ public partial struct PrivateEndpointConnectionProvisioningState : { yield return new global::System.Management.Automation.CompletionResult("'Failed'", "Failed", global::System.Management.Automation.CompletionResultType.ParameterValue, "Failed"); } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Succeeded".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Succeeded'", "Succeeded", global::System.Management.Automation.CompletionResultType.ParameterValue, "Succeeded"); + } } } } \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs b/src/Aks/Aks.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs index 2e67c1a3898e..351b055f3cb3 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/PrivateEndpointConnectionProvisioningState.cs @@ -10,6 +10,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support public partial struct PrivateEndpointConnectionProvisioningState : System.IEquatable { + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState Canceled = @"Canceled"; + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState Creating = @"Creating"; public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PrivateEndpointConnectionProvisioningState Deleting = @"Deleting"; diff --git a/src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs new file mode 100644 index 000000000000..96bf584b89c0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.Completer.cs @@ -0,0 +1,39 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// Allow or deny public network access for AKS + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccessTypeConverter))] + public partial struct PublicNetworkAccess : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Enabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Enabled'", "Enabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Enabled"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Disabled".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Disabled'", "Disabled", global::System.Management.Automation.CompletionResultType.ParameterValue, "Disabled"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs new file mode 100644 index 000000000000..2176bc330d9b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// Allow or deny public network access for AKS + public partial class PublicNetworkAccessTypeConverter : + 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) => true; + + /// + /// 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 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) => PublicNetworkAccess.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.cs b/src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.cs new file mode 100644 index 000000000000..098b105c5ce0 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/PublicNetworkAccess.cs @@ -0,0 +1,98 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// Allow or deny public network access for AKS + public partial struct PublicNetworkAccess : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess Disabled = @"Disabled"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess Enabled = @"Enabled"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to PublicNetworkAccess + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new PublicNetworkAccess(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type PublicNetworkAccess + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type PublicNetworkAccess (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is PublicNetworkAccess && Equals((PublicNetworkAccess)obj); + } + + /// Returns hashCode for enum PublicNetworkAccess + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private PublicNetworkAccess(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for PublicNetworkAccess + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to PublicNetworkAccess + /// the value to convert to an instance of . + + public static implicit operator PublicNetworkAccess(string value) + { + return new PublicNetworkAccess(value); + } + + /// Implicit operator to convert PublicNetworkAccess to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess e) + { + return e._value; + } + + /// Overriding != operator for enum PublicNetworkAccess + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum PublicNetworkAccess + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.PublicNetworkAccess e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.Completer.cs index 3f9ab3c8d6d4..4894d1cf9f7f 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.Completer.cs @@ -7,9 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { /// - /// The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master - /// components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI - /// for the managed cluster, service principal will be used instead. + /// For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). /// [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityTypeTypeConverter))] public partial struct ResourceIdentityType : diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.TypeConverter.cs index 9b4a443b4d91..30bf9eea097d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.TypeConverter.cs @@ -7,9 +7,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { /// - /// The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master - /// components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI - /// for the managed cluster, service principal will be used instead. + /// For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). /// public partial class ResourceIdentityTypeTypeConverter : global::System.Management.Automation.PSTypeConverter diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.cs b/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.cs index a3f2795b31b4..b19f46602f95 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ResourceIdentityType.cs @@ -7,17 +7,26 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { /// - /// The type of identity used for the managed cluster. Type 'SystemAssigned' will use an implicitly created identity in master - /// components and an auto-created user assigned identity in MC_ resource group in agent nodes. Type 'None' will not use MSI - /// for the managed cluster, service principal will be used instead. + /// For more information see [use managed identities in AKS](https://docs.microsoft.com/azure/aks/use-managed-identity). /// public partial struct ResourceIdentityType : System.IEquatable { + /// + /// Do not use a managed identity for the Managed Cluster, service principal will be used instead. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType None = @"None"; + /// + /// Use an implicitly created system assigned managed identity to manage cluster resources. Master components in the control + /// plane such as kube-controller-manager will use the system assigned managed identity to manipulate Azure resources. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType SystemAssigned = @"SystemAssigned"; + /// + /// Use a user-specified identity to manage cluster resources. Master components in the control plane such as kube-controller-manager + /// will use the specified user assigned managed identity to manipulate Azure resources. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ResourceIdentityType UserAssigned = @"UserAssigned"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.Completer.cs new file mode 100644 index 000000000000..d930b06c20aa --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.Completer.cs @@ -0,0 +1,41 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// + /// Describes how VMs are added to or removed from Agent Pools. See [billing states](https://docs.microsoft.com/azure/virtual-machines/states-billing). + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownModeTypeConverter))] + public partial struct ScaleDownMode : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Delete".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Delete'", "Delete", global::System.Management.Automation.CompletionResultType.ParameterValue, "Delete"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Deallocate".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Deallocate'", "Deallocate", global::System.Management.Automation.CompletionResultType.ParameterValue, "Deallocate"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.TypeConverter.cs new file mode 100644 index 000000000000..d4fa2db736b7 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// + /// Describes how VMs are added to or removed from Agent Pools. See [billing states](https://docs.microsoft.com/azure/virtual-machines/states-billing). + /// + public partial class ScaleDownModeTypeConverter : + 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) => true; + + /// + /// 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 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) => ScaleDownMode.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.cs b/src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.cs new file mode 100644 index 000000000000..6aef765d60cd --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/ScaleDownMode.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.Support +{ + + /// + /// Describes how VMs are added to or removed from Agent Pools. See [billing states](https://docs.microsoft.com/azure/virtual-machines/states-billing). + /// + public partial struct ScaleDownMode : + System.IEquatable + { + /// + /// Attempt to start deallocated instances (if they exist) during scale up and deallocate instances during scale down. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode Deallocate = @"Deallocate"; + + /// Create new instances during scale up and remove instances during scale down. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode Delete = @"Delete"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to ScaleDownMode + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new ScaleDownMode(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type ScaleDownMode + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type ScaleDownMode (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is ScaleDownMode && Equals((ScaleDownMode)obj); + } + + /// Returns hashCode for enum ScaleDownMode + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private ScaleDownMode(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for ScaleDownMode + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to ScaleDownMode + /// the value to convert to an instance of . + + public static implicit operator ScaleDownMode(string value) + { + return new ScaleDownMode(value); + } + + /// Implicit operator to convert ScaleDownMode to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode e) + { + return e._value; + } + + /// Overriding != operator for enum ScaleDownMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum ScaleDownMode + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleDownMode e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.Completer.cs index ea4c1d31c3c3..7e6712213ec0 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.Completer.cs @@ -7,7 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { /// - /// ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. + /// The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about + /// eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicyTypeConverter))] public partial struct ScaleSetEvictionPolicy : diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.TypeConverter.cs index 9e493c352288..2e0983ce447b 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.TypeConverter.cs @@ -7,7 +7,8 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { /// - /// ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. + /// The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about + /// eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// public partial class ScaleSetEvictionPolicyTypeConverter : global::System.Management.Automation.PSTypeConverter diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.cs b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.cs index 66401843ca53..1be6b70541f6 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetEvictionPolicy.cs @@ -7,13 +7,21 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { /// - /// ScaleSetEvictionPolicy to be used to specify eviction policy for Spot virtual machine scale set. Default to Delete. + /// The eviction policy specifies what to do with the VM when it is evicted. The default is Delete. For more information about + /// eviction see [spot VMs](https://docs.microsoft.com/azure/virtual-machines/spot-vms) /// public partial struct ScaleSetEvictionPolicy : System.IEquatable { + /// + /// Nodes in the underlying Scale Set of the node pool are set to the stopped-deallocated state upon eviction. Nodes in the + /// stopped-deallocated state count against your compute quota and can cause issues with cluster scaling or upgrading. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy Deallocate = @"Deallocate"; + /// + /// Nodes in the underlying Scale Set of the node pool are deleted when they're evicted. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetEvictionPolicy Delete = @"Delete"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.Completer.cs index 99905e1bff9d..9c43dfc4c0a3 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.Completer.cs @@ -6,9 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// - /// ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. - /// + /// The Virtual Machine Scale Set priority. [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriorityTypeConverter))] public partial struct ScaleSetPriority : System.Management.Automation.IArgumentCompleter diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.TypeConverter.cs index 72d1939e78e0..fb7002292a1d 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.TypeConverter.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.TypeConverter.cs @@ -6,9 +6,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// - /// ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. - /// + /// The Virtual Machine Scale Set priority. public partial class ScaleSetPriorityTypeConverter : global::System.Management.Automation.PSTypeConverter { diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.cs b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.cs index 08ac085a930b..4936ce358fdd 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/ScaleSetPriority.cs @@ -6,14 +6,17 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// - /// ScaleSetPriority to be used to specify virtual machine scale set priority. Default to regular. - /// + /// The Virtual Machine Scale Set priority. public partial struct ScaleSetPriority : System.IEquatable { + /// Regular VMs will be used. public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority Regular = @"Regular"; + /// + /// Spot priority VMs will be used. There is no SLA for spot nodes. See [spot on AKS](https://docs.microsoft.com/azure/aks/spot-node-pool) + /// for more information. + /// public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ScaleSetPriority Spot = @"Spot"; /// the value for an instance of the Enum. diff --git a/src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.Completer.cs new file mode 100644 index 000000000000..a20ab638acd2 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.Completer.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.Support +{ + + /// The type of a snapshot. The default is NodePool. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotTypeTypeConverter))] + public partial struct SnapshotType : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "NodePool".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'NodePool'", "NodePool", global::System.Management.Automation.CompletionResultType.ParameterValue, "NodePool"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.TypeConverter.cs new file mode 100644 index 000000000000..6d30ba7a6079 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The type of a snapshot. The default is NodePool. + public partial class SnapshotTypeTypeConverter : + 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) => true; + + /// + /// 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 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) => SnapshotType.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.cs b/src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.cs new file mode 100644 index 000000000000..f7ae3b95a7d9 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/SnapshotType.cs @@ -0,0 +1,97 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The type of a snapshot. The default is NodePool. + public partial struct SnapshotType : + System.IEquatable + { + /// The snapshot is a snapshot of a node pool. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType NodePool = @"NodePool"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to SnapshotType + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new SnapshotType(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type SnapshotType + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type SnapshotType (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is SnapshotType && Equals((SnapshotType)obj); + } + + /// Returns hashCode for enum SnapshotType + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private SnapshotType(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Returns string representation for SnapshotType + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Implicit operator to convert string to SnapshotType + /// the value to convert to an instance of . + + public static implicit operator SnapshotType(string value) + { + return new SnapshotType(value); + } + + /// Implicit operator to convert SnapshotType to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType e) + { + return e._value; + } + + /// Overriding != operator for enum SnapshotType + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum SnapshotType + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.Completer.cs new file mode 100644 index 000000000000..daa604b7dd10 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.Completer.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.Support +{ + + /// + /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannelTypeConverter))] + public partial struct UpgradeChannel : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "rapid".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'rapid'", "rapid", global::System.Management.Automation.CompletionResultType.ParameterValue, "rapid"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "stable".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'stable'", "stable", global::System.Management.Automation.CompletionResultType.ParameterValue, "stable"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "patch".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'patch'", "patch", global::System.Management.Automation.CompletionResultType.ParameterValue, "patch"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "node-image".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'node-image'", "node-image", global::System.Management.Automation.CompletionResultType.ParameterValue, "node-image"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "none".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'none'", "none", global::System.Management.Automation.CompletionResultType.ParameterValue, "none"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.TypeConverter.cs new file mode 100644 index 000000000000..75ea27e2b1d7 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.TypeConverter.cs @@ -0,0 +1,61 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// + /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// + public partial class UpgradeChannelTypeConverter : + 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) => true; + + /// + /// 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 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) => UpgradeChannel.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.cs b/src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.cs new file mode 100644 index 000000000000..cc87c4b3da7e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/UpgradeChannel.cs @@ -0,0 +1,131 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// + /// For more information see [setting the AKS cluster auto-upgrade channel](https://docs.microsoft.com/azure/aks/upgrade-cluster#set-auto-upgrade-channel). + /// + public partial struct UpgradeChannel : + System.IEquatable + { + /// + /// Automatically upgrade the node image to the latest version available. Microsoft provides patches and new images for image + /// nodes frequently (usually weekly), but your running nodes won't get the new images unless you do a node image upgrade. + /// Turning on the node-image channel will automatically update your node images whenever a new version is available. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel NodeImage = @"node-image"; + + /// + /// Disables auto-upgrades and keeps the cluster at its current version of Kubernetes. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel None = @"none"; + + /// + /// Automatically upgrade the cluster to the latest supported patch version when it becomes available while keeping the minor + /// version the same. For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 + /// are available, your cluster is upgraded to 1.17.9. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel Patch = @"patch"; + + /// + /// Automatically upgrade the cluster to the latest supported patch release on the latest supported minor version. In cases + /// where the cluster is at a version of Kubernetes that is at an N-2 minor version where N is the latest supported minor + /// version, the cluster first upgrades to the latest supported patch version on N-1 minor version. For example, if a cluster + /// is running version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are available, your cluster first is upgraded + /// to 1.18.6, then is upgraded to 1.19.1. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel Rapid = @"rapid"; + + /// + /// Automatically upgrade the cluster to the latest supported patch release on minor version N-1, where N is the latest supported + /// minor version. For example, if a cluster is running version 1.17.7 and versions 1.17.9, 1.18.4, 1.18.6, and 1.19.1 are + /// available, your cluster is upgraded to 1.18.6. + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel Stable = @"stable"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to UpgradeChannel + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new UpgradeChannel(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type UpgradeChannel + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type UpgradeChannel (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is UpgradeChannel && Equals((UpgradeChannel)obj); + } + + /// Returns hashCode for enum UpgradeChannel + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for UpgradeChannel + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private UpgradeChannel(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to UpgradeChannel + /// the value to convert to an instance of . + + public static implicit operator UpgradeChannel(string value) + { + return new UpgradeChannel(value); + } + + /// Implicit operator to convert UpgradeChannel to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel e) + { + return e._value; + } + + /// Overriding != operator for enum UpgradeChannel + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum UpgradeChannel + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.UpgradeChannel e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/WeekDay.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/WeekDay.Completer.cs new file mode 100644 index 000000000000..dfd130b21b14 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/WeekDay.Completer.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The weekday enum. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDayTypeConverter))] + public partial struct WeekDay : + System.Management.Automation.IArgumentCompleter + { + + /// + /// Implementations of this function are called by PowerShell to complete arguments. + /// + /// The name of the command that needs argument completion. + /// The name of the parameter that needs argument completion. + /// The (possibly empty) word being completed. + /// The command ast in case it is needed for completion. + /// This parameter is similar to $PSBoundParameters, except that sometimes PowerShell cannot + /// or will not attempt to evaluate an argument, in which case you may need to use commandAst. + /// + /// A collection of completion results, most like with ResultType set to ParameterValue. + /// + public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) + { + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Sunday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Sunday'", "Sunday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Sunday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Monday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Monday'", "Monday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Monday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Tuesday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Tuesday'", "Tuesday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Tuesday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Wednesday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Wednesday'", "Wednesday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Wednesday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Thursday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Thursday'", "Thursday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Thursday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Friday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Friday'", "Friday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Friday"); + } + if (global::System.String.IsNullOrEmpty(wordToComplete) || "Saturday".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + { + yield return new global::System.Management.Automation.CompletionResult("'Saturday'", "Saturday", global::System.Management.Automation.CompletionResultType.ParameterValue, "Saturday"); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/WeekDay.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/WeekDay.TypeConverter.cs new file mode 100644 index 000000000000..a8012e3a2840 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/WeekDay.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// The weekday enum. + public partial class WeekDayTypeConverter : + 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) => true; + + /// + /// 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 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) => WeekDay.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/WeekDay.cs b/src/Aks/Aks.Autorest/generated/api/Support/WeekDay.cs new file mode 100644 index 000000000000..9e5a734e0a6d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/WeekDay.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.Support +{ + + /// The weekday enum. + public partial struct WeekDay : + System.IEquatable + { + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay Friday = @"Friday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay Monday = @"Monday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay Saturday = @"Saturday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay Sunday = @"Sunday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay Thursday = @"Thursday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay Tuesday = @"Tuesday"; + + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay Wednesday = @"Wednesday"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WeekDay + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WeekDay(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WeekDay + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WeekDay (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WeekDay && Equals((WeekDay)obj); + } + + /// Returns hashCode for enum WeekDay + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WeekDay + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WeekDay(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WeekDay + /// the value to convert to an instance of . + + public static implicit operator WeekDay(string value) + { + return new WeekDay(value); + } + + /// Implicit operator to convert WeekDay to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay e) + { + return e._value; + } + + /// Overriding != operator for enum WeekDay + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WeekDay + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceStorageProfileTypes.Completer.cs b/src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.Completer.cs similarity index 74% rename from src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceStorageProfileTypes.Completer.cs rename to src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.Completer.cs index 8c94bd87fb47..35acf270f8fa 100644 --- a/src/Aks/Aks.Autorest/generated/api/Support/ContainerServiceStorageProfileTypes.Completer.cs +++ b/src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.Completer.cs @@ -6,12 +6,9 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support { - /// - /// Storage profile specifies what kind of storage used. Choose from StorageAccount and ManagedDisks. Leave it empty, we will - /// choose for you based on the orchestrator choice. - /// - [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.ContainerServiceStorageProfileTypesTypeConverter))] - public partial struct ContainerServiceStorageProfileTypes : + /// Determines the type of workload a node can run. + [System.ComponentModel.TypeConverter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntimeTypeConverter))] + public partial struct WorkloadRuntime : System.Management.Automation.IArgumentCompleter { @@ -29,13 +26,13 @@ public partial struct ContainerServiceStorageProfileTypes : /// public global::System.Collections.Generic.IEnumerable CompleteArgument(global::System.String commandName, global::System.String parameterName, global::System.String wordToComplete, global::System.Management.Automation.Language.CommandAst commandAst, global::System.Collections.IDictionary fakeBoundParameters) { - if (global::System.String.IsNullOrEmpty(wordToComplete) || "StorageAccount".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + if (global::System.String.IsNullOrEmpty(wordToComplete) || "OCIContainer".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { - yield return new global::System.Management.Automation.CompletionResult("'StorageAccount'", "StorageAccount", global::System.Management.Automation.CompletionResultType.ParameterValue, "StorageAccount"); + yield return new global::System.Management.Automation.CompletionResult("'OCIContainer'", "OCIContainer", global::System.Management.Automation.CompletionResultType.ParameterValue, "OCIContainer"); } - if (global::System.String.IsNullOrEmpty(wordToComplete) || "ManagedDisks".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) + if (global::System.String.IsNullOrEmpty(wordToComplete) || "WasmWasi".StartsWith(wordToComplete, global::System.StringComparison.InvariantCultureIgnoreCase)) { - yield return new global::System.Management.Automation.CompletionResult("'ManagedDisks'", "ManagedDisks", global::System.Management.Automation.CompletionResultType.ParameterValue, "ManagedDisks"); + yield return new global::System.Management.Automation.CompletionResult("'WasmWasi'", "WasmWasi", global::System.Management.Automation.CompletionResultType.ParameterValue, "WasmWasi"); } } } diff --git a/src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.TypeConverter.cs b/src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.TypeConverter.cs new file mode 100644 index 000000000000..63edce794d14 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.TypeConverter.cs @@ -0,0 +1,59 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) AutoRest Code Generator. +// Changes may cause incorrect behavior and will be lost if the code is regenerated. + +namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Support +{ + + /// Determines the type of workload a node can run. + public partial class WorkloadRuntimeTypeConverter : + 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) => true; + + /// + /// 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 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) => WorkloadRuntime.CreateFrom(sourceValue); + + /// 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/src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.cs b/src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.cs new file mode 100644 index 000000000000..4e411055eeb7 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/api/Support/WorkloadRuntime.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.Support +{ + + /// Determines the type of workload a node can run. + public partial struct WorkloadRuntime : + System.IEquatable + { + /// Nodes will use Kubelet to run standard OCI container workloads. + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime OciContainer = @"OCIContainer"; + + /// + /// Nodes will use Krustlet to run WASM workloads using the WASI provider (Preview). + /// + public static Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime WasmWasi = @"WasmWasi"; + + /// the value for an instance of the Enum. + private string _value { get; set; } + + /// Conversion from arbitrary object to WorkloadRuntime + /// the value to convert to an instance of . + internal static object CreateFrom(object value) + { + return new WorkloadRuntime(global::System.Convert.ToString(value)); + } + + /// Compares values of enum type WorkloadRuntime + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public bool Equals(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime e) + { + return _value.Equals(e._value); + } + + /// Compares values of enum type WorkloadRuntime (override for Object) + /// the value to compare against this instance. + /// true if the two instances are equal to the same value + public override bool Equals(object obj) + { + return obj is WorkloadRuntime && Equals((WorkloadRuntime)obj); + } + + /// Returns hashCode for enum WorkloadRuntime + /// The hashCode of the value + public override int GetHashCode() + { + return this._value.GetHashCode(); + } + + /// Returns string representation for WorkloadRuntime + /// A string for this value. + public override string ToString() + { + return this._value; + } + + /// Creates an instance of the Enum class. + /// the value to create an instance for. + private WorkloadRuntime(string underlyingValue) + { + this._value = underlyingValue; + } + + /// Implicit operator to convert string to WorkloadRuntime + /// the value to convert to an instance of . + + public static implicit operator WorkloadRuntime(string value) + { + return new WorkloadRuntime(value); + } + + /// Implicit operator to convert WorkloadRuntime to string + /// the value to convert to an instance of . + + public static implicit operator string(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime e) + { + return e._value; + } + + /// Overriding != operator for enum WorkloadRuntime + /// the value to compare against + /// the value to compare against + /// true if the two instances are not equal to the same value + public static bool operator !=(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime e2) + { + return !e2.Equals(e1); + } + + /// Overriding == operator for enum WorkloadRuntime + /// the value to compare against + /// the value to compare against + /// true if the two instances are equal to the same value + public static bool operator ==(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime e1, Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WorkloadRuntime e2) + { + return e2.Equals(e1); + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksContainerServiceOrchestrator_List.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksContainerServiceOrchestrator_List.cs index e86716316df1..d8ad4a8d4475 100644 --- a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksContainerServiceOrchestrator_List.cs +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksContainerServiceOrchestrator_List.cs @@ -46,9 +46,10 @@ public partial class GetAzAksContainerServiceOrchestrator_List : global::System. public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// 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 credentials, account, tenant, and subscription used for communication with Azure.")] + [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)] @@ -129,15 +130,12 @@ public partial class GetAzAksContainerServiceOrchestrator_List : global::System. /// Backing field for property. private string[] _subscriptionId; - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI - /// for every service call. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_Get.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_Get.cs new file mode 100644 index 000000000000..25291ad5808c --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_Get.cs @@ -0,0 +1,418 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Gets the specified maintenance configuration of a managed cluster. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksMaintenanceConfiguration_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the specified maintenance configuration of a managed cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class GetAzAksMaintenanceConfiguration_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _configName; + + /// The name of the maintenance configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the maintenance configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the maintenance configuration.", + SerializedName = @"configName", + PossibleTypes = new [] { typeof(string) })] + [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; } + + /// + /// 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; } + + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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.Api20230201.IMaintenanceConfiguration + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksMaintenanceConfiguration_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 ; + } + } + 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); + 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.MaintenanceConfigurationsGet(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, 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,ConfigName=ConfigName}) + { + 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, ConfigName=ConfigName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, ConfigName=ConfigName }) + { + 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.Api20230201.IMaintenanceConfiguration + /// 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.Api20230201.IMaintenanceConfiguration + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentity.cs new file mode 100644 index 000000000000..6c4927751255 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_GetViaIdentity.cs @@ -0,0 +1,387 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Gets the specified maintenance configuration of a managed cluster. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksMaintenanceConfiguration_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the specified maintenance configuration of a managed cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class GetAzAksMaintenanceConfiguration_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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.Api20230201.ICloudError + /// 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.Api20230201.IMaintenanceConfiguration + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksMaintenanceConfiguration_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 ; + } + } + 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); + 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.MaintenanceConfigurationsGetViaIdentity(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.ConfigName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ConfigName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.MaintenanceConfigurationsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.ConfigName ?? 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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.Api20230201.IMaintenanceConfiguration + /// 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.Api20230201.IMaintenanceConfiguration + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_List.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_List.cs new file mode 100644 index 000000000000..5b3e9d3134f4 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksMaintenanceConfiguration_List.cs @@ -0,0 +1,426 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Gets a list of maintenance configurations in the specified managed cluster. + /// + /// [OpenAPI] ListByManagedCluster=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksMaintenanceConfiguration_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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] + public partial class GetAzAksMaintenanceConfiguration_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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.Api20230201.IMaintenanceConfigurationListResult + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksMaintenanceConfiguration_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 ; + } + } + 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); + 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.MaintenanceConfigurationsListByManagedCluster(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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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.Api20230201.IMaintenanceConfigurationListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + 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.MaintenanceConfigurationsListByManagedCluster_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_Get.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_Get.cs new file mode 100644 index 000000000000..3fc4074b5792 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_Get.cs @@ -0,0 +1,463 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Gets the results of a command which has been run on the Managed Cluster. + /// + /// [OpenAPI] GetCommandResult=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterCommandResult_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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] + public partial class GetAzAksManagedClusterCommandResult_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _commandId; + + /// Id of the command. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Id of the command.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"Id of the command.", + SerializedName = @"commandId", + PossibleTypes = new [] { typeof(string) })] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Category(global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ParameterCategory.Path)] + public string CommandId { get => this._commandId; set => this._commandId = value; } + + /// + /// 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; } + + /// 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; + + /// + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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; } + + /// + /// overrideOnAccepted will be called before the regular onAccepted 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 header result as a from the remote call + /// /// Determines if the rest of the onAccepted method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers, 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.Api20230201.ICloudError + /// 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.Api20230201.IRunCommandResult + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksManagedClusterCommandResult_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 ; + } + } + 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); + 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.ManagedClustersGetCommandResult(SubscriptionId, ResourceGroupName, ResourceName, CommandId, onOk, onAccepted, 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,CommandId=CommandId}) + { + 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(); + } + + /// a delegate that is called when the remote service returns 202 (Accepted). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the header result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnAccepted(responseMessage, headers, ref _returnNow); + // if overrideOnAccepted has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onAccepted - response for 202 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, CommandId=CommandId }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, CommandId=CommandId }) + { + 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.Api20230201.IRunCommandResult + /// 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.Api20230201.IRunCommandResult + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentity.cs new file mode 100644 index 000000000000..f3a0b0c890cc --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterCommandResult_GetViaIdentity.cs @@ -0,0 +1,432 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Gets the results of a command which has been run on the Managed Cluster. + /// + /// [OpenAPI] GetCommandResult=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/commandResults/{commandId}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterCommandResult_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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] + public partial class GetAzAksManagedClusterCommandResult_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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, 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. + /// + private 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; } + + /// + /// overrideOnAccepted will be called before the regular onAccepted 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 header result as a from the remote call + /// /// Determines if the rest of the onAccepted method should be processed, or if the method should + /// return immediately (set to true to skip further processing ) + + partial void overrideOnAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers, 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.Api20230201.ICloudError + /// 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.Api20230201.IRunCommandResult + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksManagedClusterCommandResult_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 ; + } + } + 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); + 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.ManagedClustersGetCommandResultViaIdentity(InputObject.Id, onOk, onAccepted, 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.CommandId) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.CommandId"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.ManagedClustersGetCommandResult(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.CommandId ?? null, onOk, onAccepted, 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(); + } + + /// a delegate that is called when the remote service returns 202 (Accepted). + /// the raw response message as an global::System.Net.Http.HttpResponseMessage. + /// the header result as a from the remote call + /// + /// A that will be complete when handling of the method is completed. + /// + private async global::System.Threading.Tasks.Task onAccepted(global::System.Net.Http.HttpResponseMessage responseMessage, global::System.Threading.Tasks.Task headers) + { + using( NoSynchronizationContext ) + { + var _returnNow = global::System.Threading.Tasks.Task.FromResult(false); + overrideOnAccepted(responseMessage, headers, ref _returnNow); + // if overrideOnAccepted has returned true, then return right away. + if ((null != _returnNow && await _returnNow)) + { + return ; + } + // onAccepted - response for 202 / + if (true == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + + /// + /// 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.Api20230201.ICloudError + /// 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.Api20230201.IRunCommandResult + /// 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.Api20230201.IRunCommandResult + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_Get.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_Get.cs new file mode 100644 index 000000000000..38170b40976d --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_Get.cs @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Gets supported OS options in the specified subscription. + /// + /// [OpenAPI] GetOSOptions=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default" + /// + [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.Api20230201.IOSOptionProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets supported OS options in the specified subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class GetAzAksManagedClusterOSOption_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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 Azure region. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of Azure region.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of 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. + /// + private 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 _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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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.Api20230201.IOSOptionProfile + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksManagedClusterOSOption_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 ; + } + } + 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); + 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.ManagedClustersGetOSOptions(SubscriptionId, Location, this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : 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 { SubscriptionId=SubscriptionId,Location=Location,ResourceType=this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null}) + { + 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, Location=Location, ResourceType=this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null }) + { + 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 { SubscriptionId=SubscriptionId, Location=Location, ResourceType=this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null }) + { + 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.Api20230201.IOSOptionProfile + /// 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.Api20230201.IOSOptionProfile + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_GetViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_GetViaIdentity.cs new file mode 100644 index 000000000000..2f244d9ab497 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOSOption_GetViaIdentity.cs @@ -0,0 +1,393 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Gets supported OS options in the specified subscription. + /// + /// [OpenAPI] GetOSOptions=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/locations/{location}/osOptions/default" + /// + [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.Api20230201.IOSOptionProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets supported OS options in the specified subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class GetAzAksManagedClusterOSOption_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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 _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.Api20230201.ICloudError + /// 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.Api20230201.IOSOptionProfile + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksManagedClusterOSOption_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 ; + } + } + 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); + 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.ManagedClustersGetOSOptionsViaIdentity(InputObject.Id, this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null, 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.Location) + { + 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); + } + 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}) + { + 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { ResourceType=this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null }) + { + 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 { ResourceType=this.InvocationInformation.BoundParameters.ContainsKey("ResourceType") ? ResourceType : null }) + { + 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.Api20230201.IOSOptionProfile + /// 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.Api20230201.IOSOptionProfile + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_List.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_List.cs new file mode 100644 index 000000000000..5e5ec3dbc7e5 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_List.cs @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// + /// 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. + /// + /// + /// [OpenAPI] ListOutboundNetworkDependenciesEndpoints=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/outboundNetworkDependenciesEndpoints" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksManagedClusterOutboundNetworkDependencyEndpoint_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.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] + public partial class GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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.Api20230201.IOutboundEnvironmentEndpointCollection + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksManagedClusterOutboundNetworkDependencyEndpoint_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 ; + } + } + 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); + 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.ManagedClustersListOutboundNetworkDependenciesEndpoints(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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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.Api20230201.IOutboundEnvironmentEndpointCollection + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + 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.ManagedClustersListOutboundNetworkDependenciesEndpoints_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_Get.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_Get.cs index f30b62675bd0..6fb48d7ca352 100644 --- a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_Get.cs +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_Get.cs @@ -8,15 +8,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; using System; - /// - /// Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. - /// + /// Gets the upgrade profile for an agent pool. /// /// [OpenAPI] GetUpgradeProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksNodePoolUpgradeProfile_Get")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the upgrade profile for an agent pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] public partial class GetAzAksNodePoolUpgradeProfile_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener @@ -58,9 +56,10 @@ public partial class GetAzAksNodePoolUpgradeProfile_Get : global::System.Managem public string ClusterName { get => this._clusterName; set => this._clusterName = value; } /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// 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 credentials, account, tenant, and subscription used for communication with Azure.")] + [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)] @@ -128,12 +127,12 @@ public partial class GetAzAksNodePoolUpgradeProfile_Get : global::System.Managem /// Backing field for property. private string _resourceGroupName; - /// The name of the resource group. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group.")] + /// 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.", + 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)] @@ -142,15 +141,12 @@ public partial class GetAzAksNodePoolUpgradeProfile_Get : global::System.Managem /// Backing field for property. private string[] _subscriptionId; - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI - /// for every service call. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -165,24 +161,24 @@ 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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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.Api20200901.IAgentPoolUpgradeProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile /// 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) @@ -358,12 +354,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 ) { @@ -380,7 +376,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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName, NodePoolName=NodePoolName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -398,12 +394,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.Api20200901.IAgentPoolUpgradeProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile /// 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 ) { @@ -415,7 +411,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile WriteObject((await response)); } } diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentity.cs index 62d80402e585..37829883d9f5 100644 --- a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentity.cs +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksNodePoolUpgradeProfile_GetViaIdentity.cs @@ -8,15 +8,13 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; using System; - /// - /// Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. - /// + /// Gets the upgrade profile for an agent pool. /// /// [OpenAPI] GetUpgradeProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/agentPools/{agentPoolName}/upgradeProfiles/default" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksNodePoolUpgradeProfile_GetViaIdentity")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the upgrade profile for an agent pool.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] public partial class GetAzAksNodePoolUpgradeProfile_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener @@ -44,9 +42,10 @@ public partial class GetAzAksNodePoolUpgradeProfile_GetViaIdentity : global::Sys public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// 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 credentials, account, tenant, and subscription used for communication with Azure.")] + [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)] @@ -109,24 +108,24 @@ 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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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.Api20200901.IAgentPoolUpgradeProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile /// 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) @@ -323,12 +322,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 ) { @@ -345,7 +344,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 } @@ -363,12 +362,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.Api20200901.IAgentPoolUpgradeProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile /// 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 ) { @@ -380,7 +379,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile WriteObject((await response)); } } diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksOperation_List.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksOperation_List.cs index 93a78d62f256..b668613ea9dd 100644 --- a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksOperation_List.cs +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksOperation_List.cs @@ -8,14 +8,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; using System; - /// Gets a list of compute operations. + /// Gets a list of operations. /// /// [OpenAPI] List=>GET:"/providers/Microsoft.ContainerService/operations" /// [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.InternalExport] [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksOperation_List")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a list of compute operations.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a list of operations.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] public partial class GetAzAksOperation_List : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener @@ -43,9 +43,10 @@ public partial class GetAzAksOperation_List : global::System.Management.Automati public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// 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 credentials, account, tenant, and subscription used for communication with Azure.")] + [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)] @@ -100,24 +101,24 @@ 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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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.Api20200901.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult /// 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) @@ -290,12 +291,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 ) { @@ -312,7 +313,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 } @@ -330,12 +331,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.Api20200901.IOperationListResult + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationListResult /// 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 ) { diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_Get.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_Get.cs new file mode 100644 index 000000000000..414142955c09 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_Get.cs @@ -0,0 +1,404 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Gets a snapshot. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksSnapshot_Get")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a snapshot.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class GetAzAksSnapshot_Get : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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.Api20230201.ISnapshot + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksSnapshot_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 ; + } + } + 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); + 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.SnapshotsGet(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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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.Api20230201.ISnapshot + /// 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.Api20230201.ISnapshot + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_GetViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_GetViaIdentity.cs new file mode 100644 index 000000000000..516a6560d32e --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_GetViaIdentity.cs @@ -0,0 +1,383 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Gets a snapshot. + /// + /// [OpenAPI] Get=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksSnapshot_GetViaIdentity")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a snapshot.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class GetAzAksSnapshot_GetViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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.Api20230201.ICloudError + /// 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.Api20230201.ISnapshot + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksSnapshot_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 ; + } + } + 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); + 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.SnapshotsGetViaIdentity(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) ); + } + await this.Client.SnapshotsGet(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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.Api20230201.ISnapshot + /// 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.Api20230201.ISnapshot + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List.cs new file mode 100644 index 000000000000..6d3437f1a287 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List.cs @@ -0,0 +1,398 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Gets a list of snapshots in the specified subscription. + /// + /// [OpenAPI] List=>GET:"/subscriptions/{subscriptionId}/providers/Microsoft.ContainerService/snapshots" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksSnapshot_List")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets a list of snapshots in the specified subscription.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class GetAzAksSnapshot_List : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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.Api20230201.ISnapshotListResult + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksSnapshot_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 ; + } + } + 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); + 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.SnapshotsList(SubscriptionId, 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}) + { + 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId }) + { + 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 { SubscriptionId=SubscriptionId }) + { + 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.Api20230201.ISnapshotListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + 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.SnapshotsList_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List1.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List1.cs new file mode 100644 index 000000000000..509b6b6d3f7b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksSnapshot_List1.cs @@ -0,0 +1,412 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Lists snapshots in the specified subscription and resource group. + /// + /// [OpenAPI] ListByResourceGroup=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksSnapshot_List1")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Lists snapshots in the specified subscription and resource group.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class GetAzAksSnapshot_List1 : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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 flag to tell whether it is the first onOK call. + private bool _isFirst = true; + + /// Link to retrieve next page. + private string _nextLink; + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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[] _subscriptionId; + + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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.Api20230201.ISnapshotListResult + /// 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public GetAzAksSnapshot_List1() + { + + } + + /// 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 ; + } + } + 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); + 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.SnapshotsListByResourceGroup(SubscriptionId, ResourceGroupName, 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}) + { + 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName }) + { + 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.Api20230201.ISnapshotListResult + /// 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 + // response should be returning an array of some kind. +Pageable + // pageable / value / nextLink + var result = await response; + WriteObject(result.Value,true); + _nextLink = result.NextLink; + if (_isFirst) + { + _isFirst = false; + while (_nextLink != null) + { + 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.SnapshotsListByResourceGroup_Call(requestMessage, onOk, onDefault, this, Pipeline); + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_Get.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_Get.cs index 6df609002cd0..8ac2b9ca6a4b 100644 --- a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_Get.cs +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_Get.cs @@ -8,16 +8,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; using System; - /// - /// Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. - /// + /// Gets the upgrade profile of a managed cluster. /// /// [OpenAPI] GetUpgradeProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksUpgradeProfile_Get")] [global::System.Management.Automation.Alias("Get-AzAksClusterUpgradeProfile")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the details of the upgrade profile for a managed cluster with a specified resource group and name.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the upgrade profile of a managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] public partial class GetAzAksUpgradeProfile_Get : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener @@ -60,9 +58,10 @@ public partial class GetAzAksUpgradeProfile_Get : global::System.Management.Auto public string ClusterName { get => this._clusterName; set => this._clusterName = value; } /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// 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 credentials, account, tenant, and subscription used for communication with Azure.")] + [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)] @@ -115,12 +114,12 @@ public partial class GetAzAksUpgradeProfile_Get : global::System.Management.Auto /// Backing field for property. private string _resourceGroupName; - /// The name of the resource group. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group.")] + /// 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.", + 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)] @@ -129,15 +128,12 @@ public partial class GetAzAksUpgradeProfile_Get : global::System.Management.Auto /// Backing field for property. private string[] _subscriptionId; - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI - /// for every service call. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -152,24 +148,24 @@ 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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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.Api20200901.IManagedClusterUpgradeProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile /// 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) @@ -345,12 +341,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 ) { @@ -367,7 +363,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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ClusterName=ClusterName }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } @@ -385,12 +381,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.Api20200901.IManagedClusterUpgradeProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile /// 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 ) { @@ -402,7 +398,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile WriteObject((await response)); } } diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_GetViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_GetViaIdentity.cs index 86cdb7c21cf7..28dcef44db67 100644 --- a/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_GetViaIdentity.cs +++ b/src/Aks/Aks.Autorest/generated/cmdlets/GetAzAksUpgradeProfile_GetViaIdentity.cs @@ -8,16 +8,14 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; using System; - /// - /// Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. - /// + /// Gets the upgrade profile of a managed cluster. /// /// [OpenAPI] GetUpgradeProfile=>GET:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/upgradeProfiles/default" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Get, @"AzAksUpgradeProfile_GetViaIdentity")] [global::System.Management.Automation.Alias("Get-AzAksClusterUpgradeProfile")] - [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the details of the upgrade profile for a managed cluster with a specified resource group and name.")] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Gets the upgrade profile of a managed cluster.")] [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] public partial class GetAzAksUpgradeProfile_GetViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener @@ -45,9 +43,10 @@ public partial class GetAzAksUpgradeProfile_GetViaIdentity : global::System.Mana public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// 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 credentials, account, tenant, and subscription used for communication with Azure.")] + [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)] @@ -110,24 +109,24 @@ 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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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.Api20200901.IManagedClusterUpgradeProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile /// 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) @@ -320,12 +319,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 ) { @@ -342,7 +341,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 } @@ -360,12 +359,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.Api20200901.IManagedClusterUpgradeProfile + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile /// 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 ) { @@ -377,7 +376,7 @@ protected override void StopProcessing() return ; } // onOk - response for 200 / application/json - // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile + // (await response) // should be Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile WriteObject((await response)); } } diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_Abort.cs b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_Abort.cs new file mode 100644 index 000000000000..8c89f54dec8f --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_Abort.cs @@ -0,0 +1,494 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// + /// 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. + /// + /// + /// [OpenAPI] AbortLatestOperation=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzAksAbortAgentPoolLatestOperation_Abort", SupportsShouldProcess = true)] + [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] + public partial class InvokeAzAksAbortAgentPoolLatestOperation_Abort : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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; + + /// + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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); + + /// + /// (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 InvokeAzAksAbortAgentPoolLatestOperation_Abort + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksAbortAgentPoolLatestOperation_Abort Clone() + { + var clone = new InvokeAzAksAbortAgentPoolLatestOperation_Abort(); + 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; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzAksAbortAgentPoolLatestOperation_Abort() + { + + } + + /// 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.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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; + } + } + 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 'AgentPoolsAbortLatestOperation' 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); + 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.AgentPoolsAbortLatestOperation(SubscriptionId, ResourceGroupName, ResourceName, AgentPoolName, onNoContent, 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, AgentPoolName=AgentPoolName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, AgentPoolName=AgentPoolName }) + { + 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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity.cs new file mode 100644 index 000000000000..40c6d07a04bd --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity.cs @@ -0,0 +1,464 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// + /// 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. + /// + /// + /// [OpenAPI] AbortLatestOperation=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/agentPools/{agentPoolName}/abort" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzAksAbortAgentPoolLatestOperation_AbortViaIdentity", SupportsShouldProcess = true)] + [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] + public partial class InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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.Api20230201.ICloudError + /// 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); + + /// + /// (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 InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity Clone() + { + var clone = new InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity(); + 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzAksAbortAgentPoolLatestOperation_AbortViaIdentity() + { + + } + + /// 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.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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; + } + } + 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 'AgentPoolsAbortLatestOperation' 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); + 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.AgentPoolsAbortLatestOperationViaIdentity(InputObject.Id, onNoContent, 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.AgentPoolsAbortLatestOperation(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.AgentPoolName ?? null, onNoContent, 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_Abort.cs b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_Abort.cs new file mode 100644 index 000000000000..4e51bb256bb3 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_Abort.cs @@ -0,0 +1,479 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// + /// 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. + /// + /// + /// [OpenAPI] AbortLatestOperation=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzAksAbortManagedClusterLatestOperation_Abort", SupportsShouldProcess = true)] + [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] + public partial class InvokeAzAksAbortManagedClusterLatestOperation_Abort : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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; + + /// + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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); + + /// + /// (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 InvokeAzAksAbortManagedClusterLatestOperation_Abort + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksAbortManagedClusterLatestOperation_Abort Clone() + { + var clone = new InvokeAzAksAbortManagedClusterLatestOperation_Abort(); + 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; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzAksAbortManagedClusterLatestOperation_Abort() + { + + } + + /// 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.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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; + } + } + 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 'ManagedClustersAbortLatestOperation' 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); + 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.ManagedClustersAbortLatestOperation(SubscriptionId, ResourceGroupName, ResourceName, onNoContent, 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity.cs new file mode 100644 index 000000000000..983a02791fe6 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity.cs @@ -0,0 +1,461 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// + /// 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. + /// + /// + /// [OpenAPI] AbortLatestOperation=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedclusters/{resourceName}/abort" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzAksAbortManagedClusterLatestOperation_AbortViaIdentity", SupportsShouldProcess = true)] + [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] + public partial class InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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.Api20230201.ICloudError + /// 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); + + /// + /// (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 InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity Clone() + { + var clone = new InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity(); + 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public InvokeAzAksAbortManagedClusterLatestOperation_AbortViaIdentity() + { + + } + + /// 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.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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; + } + } + 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 'ManagedClustersAbortLatestOperation' 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); + 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.ManagedClustersAbortLatestOperationViaIdentity(InputObject.Id, onNoContent, 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) ); + } + await this.Client.ManagedClustersAbortLatestOperation(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onNoContent, 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate.cs b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate.cs new file mode 100644 index 000000000000..0b59d7108c22 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate.cs @@ -0,0 +1,478 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Rotates the service account signing keys of a managed cluster. + /// + /// [OpenAPI] RotateServiceAccountSigningKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzAksRotateManagedClusterServiceAccountSigningKey_Rotate", SupportsShouldProcess = true)] + [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] + public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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; + + /// + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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); + + /// + /// (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 InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate Clone() + { + var clone = new InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate(); + 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; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// + /// Intializes a new instance of the cmdlet + /// class. + /// + public InvokeAzAksRotateManagedClusterServiceAccountSigningKey_Rotate() + { + + } + + /// 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.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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; + } + } + 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 'ManagedClustersRotateServiceAccountSigningKeys' 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); + 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.ManagedClustersRotateServiceAccountSigningKeys(SubscriptionId, ResourceGroupName, ResourceName, onNoContent, 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity.cs new file mode 100644 index 000000000000..a5ddd8b80efb --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity.cs @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Rotates the service account signing keys of a managed cluster. + /// + /// [OpenAPI] RotateServiceAccountSigningKeys=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/rotateServiceAccountSigningKeys" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Invoke, @"AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity", SupportsShouldProcess = true)] + [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] + public partial class InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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. + /// + private 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.Api20230201.ICloudError + /// 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); + + /// + /// (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 InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity + /// + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity Clone() + { + var clone = new InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity(); + 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() + { + + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public InvokeAzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity() + { + + } + + /// 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.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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; + } + } + 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 'ManagedClustersRotateServiceAccountSigningKeys' 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); + 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.ManagedClustersRotateServiceAccountSigningKeysViaIdentity(InputObject.Id, onNoContent, 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) ); + } + await this.Client.ManagedClustersRotateServiceAccountSigningKeys(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onNoContent, 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateExpanded.cs b/src/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateExpanded.cs new file mode 100644 index 000000000000..dba5a3c4be89 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/NewAzAksMaintenanceConfiguration_CreateExpanded.cs @@ -0,0 +1,452 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// + /// Creates or updates a maintenance configuration in the specified managed cluster. + /// + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzAksMaintenanceConfiguration_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Creates or updates a maintenance configuration in the specified managed cluster.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class NewAzAksMaintenanceConfiguration_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// + /// See [planned maintenance](https://docs.microsoft.com/azure/aks/planned-maintenance) for more information about planned + /// maintenance. + /// + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.MaintenanceConfiguration(); + + /// 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; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _configName; + + /// The name of the maintenance configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the maintenance configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the maintenance configuration.", + SerializedName = @"configName", + PossibleTypes = new [] { typeof(string) })] + [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; } + + /// + /// 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; } + + /// 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; + + /// Time slots on which upgrade is not allowed. + [global::System.Management.Automation.AllowEmptyCollection] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Time slots on which upgrade is not allowed.")] + [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 = @"Time slots on which upgrade is not allowed.", + SerializedName = @"notAllowedTime", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan) })] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[] NotAllowedTime { get => _parametersBody.NotAllowedTime ?? null /* arrayOf */; set => _parametersBody.NotAllowedTime = value; } + + /// + /// The instance of the that the remote call will use. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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; } + + /// + /// 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::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.", + SerializedName = @"timeInWeek", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek) })] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[] TimeInWeek { get => _parametersBody.TimeInWeek ?? null /* arrayOf */; set => _parametersBody.TimeInWeek = 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.Api20230201.ICloudError + /// 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.Api20230201.IMaintenanceConfiguration + /// 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() + { + + } + + /// 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 ; + } + } + 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)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzAksMaintenanceConfiguration_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 'MaintenanceConfigurationsCreateOrUpdate' operation")) + { + 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); + 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.MaintenanceConfigurationsCreateOrUpdate(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, _parametersBody, 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,ConfigName=ConfigName,body=_parametersBody}) + { + 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(); + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, ConfigName=ConfigName, body=_parametersBody }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, ConfigName=ConfigName, body=_parametersBody }) + { + 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.Api20230201.IMaintenanceConfiguration + /// 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.Api20230201.IMaintenanceConfiguration + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateExpanded.cs b/src/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateExpanded.cs new file mode 100644 index 000000000000..e066cd7c66eb --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/NewAzAksSnapshot_CreateExpanded.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 System; + + /// Creates or updates a snapshot. + /// + /// [OpenAPI] CreateOrUpdate=>PUT:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.New, @"AzAksSnapshot_CreateExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Creates or updates a snapshot.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class NewAzAksSnapshot_CreateExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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 node pool snapshot resource. + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot _parametersBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.Snapshot(); + + /// 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; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// This is the ARM ID of the source object to be used to create the target object. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "This is the ARM ID of the source object to be used to create the target object.")] + [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 = @"This is the ARM ID of the source object to be used to create the target object.", + SerializedName = @"sourceResourceId", + PossibleTypes = new [] { typeof(string) })] + public string CreationDataSourceResourceId { get => _parametersBody.CreationDataSourceResourceId ?? null; set => _parametersBody.CreationDataSourceResourceId = value; } + + /// + /// 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; } + + /// 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 geo-location where the resource lives + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The geo-location where the resource lives")] + [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 geo-location where the resource lives", + SerializedName = @"location", + PossibleTypes = new [] { typeof(string) })] + public string Location { get => _parametersBody.Location ?? null; set => _parametersBody.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. + /// + private 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; } + + /// The type of a snapshot. The default is NodePool. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "The type of a snapshot. The default is NodePool.")] + [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 type of a snapshot. The default is NodePool.", + SerializedName = @"snapshotType", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType) })] + [global::System.Management.Automation.ArgumentCompleter(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType))] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType SnapshotType { get => _parametersBody.SnapshotType ?? ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType)""); set => _parametersBody.SnapshotType = 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.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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; } + + /// Resource tags. + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.ExportAs(typeof(global::System.Collections.Hashtable))] + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "Resource tags.")] + [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 = @"Resource tags.", + SerializedName = @"tags", + PossibleTypes = new [] { typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags) })] + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api30.ITrackedResourceTags Tag { get => _parametersBody.Tag ?? null /* object */; set => _parametersBody.Tag = 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.Api20230201.ISnapshot + /// 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.Api20230201.ICloudError + /// 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.Api20230201.ISnapshot + /// 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() + { + + } + + /// 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 ; + } + } + 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)}"); + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public NewAzAksSnapshot_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 'SnapshotsCreateOrUpdate' operation")) + { + 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); + 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.SnapshotsCreateOrUpdate(SubscriptionId, ResourceGroupName, ResourceName, _parametersBody, 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) + { + WriteError(new global::System.Management.Automation.ErrorRecord(urexception, urexception.StatusCode.ToString(), global::System.Management.Automation.ErrorCategory.InvalidOperation, new { SubscriptionId=SubscriptionId,ResourceGroupName=ResourceGroupName,ResourceName=ResourceName,body=_parametersBody}) + { + 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(); + } + + /// 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.Api20230201.ISnapshot + /// 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.Api20230201.ISnapshot + WriteObject((await response)); + } + } + + /// + /// 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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, body=_parametersBody }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, body=_parametersBody }) + { + 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.Api20230201.ISnapshot + /// 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.Api20230201.ISnapshot + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_Delete.cs b/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_Delete.cs new file mode 100644 index 000000000000..a42b964f9d6b --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_Delete.cs @@ -0,0 +1,457 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Deletes a maintenance configuration. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksMaintenanceConfiguration_Delete", SupportsShouldProcess = true)] + [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] + public partial class RemoveAzAksMaintenanceConfiguration_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// Backing field for property. + private string _configName; + + /// The name of the maintenance configuration. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the maintenance configuration.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The name of the maintenance configuration.", + SerializedName = @"configName", + PossibleTypes = new [] { typeof(string) })] + [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; } + + /// + /// 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; } + + /// 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; + + /// + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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 ; + } + } + 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 'MaintenanceConfigurationsDelete' operation")) + { + 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); + 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.MaintenanceConfigurationsDelete(SubscriptionId, ResourceGroupName, ResourceName, ConfigName, onOk, onNoContent, 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,ConfigName=ConfigName}) + { + 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); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzAksMaintenanceConfiguration_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, ConfigName=ConfigName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, ConfigName=ConfigName }) + { + 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 == MyInvocation?.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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity.cs new file mode 100644 index 000000000000..ed310c9f0001 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity.cs @@ -0,0 +1,429 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Deletes a maintenance configuration. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/maintenanceConfigurations/{configName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksMaintenanceConfiguration_DeleteViaIdentity", SupportsShouldProcess = true)] + [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] + public partial class RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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, 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. + /// + private 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.Api20230201.ICloudError + /// 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; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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 ; + } + } + 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 'MaintenanceConfigurationsDelete' operation")) + { + 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); + 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.MaintenanceConfigurationsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, 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.ConfigName) + { + ThrowTerminatingError( new global::System.Management.Automation.ErrorRecord(new global::System.Exception("InputObject has null value for InputObject.ConfigName"),string.Empty, global::System.Management.Automation.ErrorCategory.InvalidArgument, InputObject) ); + } + await this.Client.MaintenanceConfigurationsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, InputObject.ConfigName ?? null, onOk, onNoContent, 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); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzAksMaintenanceConfiguration_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.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.Api20230201.ICloudError + /// 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 == MyInvocation?.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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_Delete.cs b/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_Delete.cs new file mode 100644 index 000000000000..4b0700b31074 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_Delete.cs @@ -0,0 +1,443 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Deletes a snapshot. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksSnapshot_Delete", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes a snapshot.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class RemoveAzAksSnapshot_Delete : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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; + + /// + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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 ; + } + } + 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 'SnapshotsDelete' operation")) + { + 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); + 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.SnapshotsDelete(SubscriptionId, ResourceGroupName, ResourceName, onOk, onNoContent, 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); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzAksSnapshot_Delete() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName }) + { + 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 == MyInvocation?.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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_DeleteViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_DeleteViaIdentity.cs new file mode 100644 index 000000000000..15c720c87e9a --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/RemoveAzAksSnapshot_DeleteViaIdentity.cs @@ -0,0 +1,425 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// Deletes a snapshot. + /// + /// [OpenAPI] Delete=>DELETE:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/snapshots/{resourceName}" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsCommon.Remove, @"AzAksSnapshot_DeleteViaIdentity", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(bool))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Deletes a snapshot.")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class RemoveAzAksSnapshot_DeleteViaIdentity : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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(); + + /// 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; } + + /// 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; } + + /// 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, 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. + /// + private 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.Api20230201.ICloudError + /// 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; } + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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 ; + } + } + 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 'SnapshotsDelete' operation")) + { + 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); + 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.SnapshotsDeleteViaIdentity(InputObject.Id, onOk, onNoContent, 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) ); + } + await this.Client.SnapshotsDelete(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, onOk, onNoContent, 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); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public RemoveAzAksSnapshot_DeleteViaIdentity() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.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.Api20230201.ICloudError + /// 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 == MyInvocation?.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 == MyInvocation?.BoundParameters?.ContainsKey("PassThru")) + { + WriteObject(true); + } + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_Start.cs b/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_Start.cs index 6f81948fcbb5..8aa19e3fd598 100644 --- a/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_Start.cs +++ b/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_Start.cs @@ -8,13 +8,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; using System; - /// Starts a Stopped Managed Cluster + /// + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// /// /// [OpenAPI] Start=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzAksCluster_Start", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Starts a Stopped Managed Cluster")] + [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] public partial class StartAzAksCluster_Start : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener @@ -47,9 +49,10 @@ public partial class StartAzAksCluster_Start : global::System.Management.Automat public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// 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 credentials, account, tenant, and subscription used for communication with Azure.")] + [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)] @@ -132,12 +135,12 @@ public partial class StartAzAksCluster_Start : global::System.Management.Automat /// Backing field for property. private string _resourceGroupName; - /// The name of the resource group. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group.")] + /// 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.", + 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)] @@ -146,15 +149,12 @@ public partial class StartAzAksCluster_Start : global::System.Management.Automat /// Backing field for property. private string _subscriptionId; - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI - /// for every service call. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -169,12 +169,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 @@ -413,12 +413,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 ) { @@ -435,7 +435,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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_StartViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_StartViaIdentity.cs index 481cabe2f5e5..a9b37305694f 100644 --- a/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_StartViaIdentity.cs +++ b/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksCluster_StartViaIdentity.cs @@ -8,13 +8,15 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; using System; - /// Starts a Stopped Managed Cluster + /// + /// See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. + /// /// /// [OpenAPI] Start=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/start" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzAksCluster_StartViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Starts a Stopped Managed Cluster")] + [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] public partial class StartAzAksCluster_StartViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener @@ -47,9 +49,10 @@ public partial class StartAzAksCluster_StartViaIdentity : global::System.Managem public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// 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 credentials, account, tenant, and subscription used for communication with Azure.")] + [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)] @@ -127,12 +130,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 @@ -388,12 +391,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 ) { @@ -410,7 +413,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/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunExpanded.cs b/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunExpanded.cs new file mode 100644 index 000000000000..435e3745ad15 --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunExpanded.cs @@ -0,0 +1,510 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (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 System; + + /// + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS + /// Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// [OpenAPI] RunCommand=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzAksManagedClusterCommand_RunExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class StartAzAksManagedClusterCommand_RunExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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 run command request + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequest _requestPayloadBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.RunCommandRequest(); + + /// 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; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// AuthToken issued for AKS AAD Server App. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "AuthToken issued for AKS AAD Server App.")] + [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 = @"AuthToken issued for AKS AAD Server App.", + SerializedName = @"clusterToken", + PossibleTypes = new [] { typeof(string) })] + public string ClusterToken { get => _requestPayloadBody.ClusterToken ?? null; set => _requestPayloadBody.ClusterToken = value; } + + /// The command to run. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The command to run.")] + [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 command to run.", + SerializedName = @"command", + PossibleTypes = new [] { typeof(string) })] + public string Command { get => _requestPayloadBody.Command ?? null; set => _requestPayloadBody.Command = value; } + + /// A base64 encoded zip file containing the files required by the command. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A base64 encoded zip file containing the files required by the command.")] + [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 base64 encoded zip file containing the files required by the command.", + SerializedName = @"context", + PossibleTypes = new [] { typeof(string) })] + public string Context { get => _requestPayloadBody.Context ?? null; set => _requestPayloadBody.Context = value; } + + /// + /// 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; } + + /// 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; + + /// + /// 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. + /// + private 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. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( + Required = true, + ReadOnly = false, + Description = @"The ID of the target subscription.", + SerializedName = @"subscriptionId", + PossibleTypes = new [] { typeof(string) })] + [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( + Name = @"", + Description =@"", + Script = @"(Get-AzContext).Subscription.Id")] + [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.Api20230201.ICloudError + /// 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.Api20230201.IRunCommandResult + /// 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 StartAzAksManagedClusterCommand_RunExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.StartAzAksManagedClusterCommand_RunExpanded Clone() + { + var clone = new StartAzAksManagedClusterCommand_RunExpanded(); + 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._requestPayloadBody = this._requestPayloadBody; + clone.SubscriptionId = this.SubscriptionId; + clone.ResourceGroupName = this.ResourceGroupName; + clone.ResourceName = this.ResourceName; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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; + } + } + 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 'ManagedClustersRunCommand' 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); + 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.ManagedClustersRunCommand(SubscriptionId, ResourceGroupName, ResourceName, _requestPayloadBody, 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,body=_requestPayloadBody}) + { + 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); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public StartAzAksManagedClusterCommand_RunExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.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.Api20230201.ICloudError + /// 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, body=_requestPayloadBody }) + { + 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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, ResourceName=ResourceName, body=_requestPayloadBody }) + { + 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.Api20230201.IRunCommandResult + /// 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.Api20230201.IRunCommandResult + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaIdentityExpanded.cs b/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaIdentityExpanded.cs new file mode 100644 index 000000000000..787c9a4658dc --- /dev/null +++ b/src/Aks/Aks.Autorest/generated/cmdlets/StartAzAksManagedClusterCommand_RunViaIdentityExpanded.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 System; + + /// + /// AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS + /// Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + /// + /// + /// [OpenAPI] RunCommand=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/runCommand" + /// + [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Start, @"AzAksManagedClusterCommand_RunViaIdentityExpanded", SupportsShouldProcess = true)] + [global::System.Management.Automation.OutputType(typeof(Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult))] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"AKS will create a pod to run the command. This is primarily useful for private clusters. For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview).")] + [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Generated] + public partial class StartAzAksManagedClusterCommand_RunViaIdentityExpanded : global::System.Management.Automation.PSCmdlet, + Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener + { + /// 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 run command request + private Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandRequest _requestPayloadBody = new Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.RunCommandRequest(); + + /// 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; } + + /// The reference to the client API class. + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; + + /// AuthToken issued for AKS AAD Server App. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "AuthToken issued for AKS AAD Server App.")] + [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 = @"AuthToken issued for AKS AAD Server App.", + SerializedName = @"clusterToken", + PossibleTypes = new [] { typeof(string) })] + public string ClusterToken { get => _requestPayloadBody.ClusterToken ?? null; set => _requestPayloadBody.ClusterToken = value; } + + /// The command to run. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The command to run.")] + [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 command to run.", + SerializedName = @"command", + PossibleTypes = new [] { typeof(string) })] + public string Command { get => _requestPayloadBody.Command ?? null; set => _requestPayloadBody.Command = value; } + + /// A base64 encoded zip file containing the files required by the command. + [global::System.Management.Automation.Parameter(Mandatory = false, HelpMessage = "A base64 encoded zip file containing the files required by the command.")] + [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 base64 encoded zip file containing the files required by the command.", + SerializedName = @"context", + PossibleTypes = new [] { typeof(string) })] + public string Context { get => _requestPayloadBody.Context ?? null; set => _requestPayloadBody.Context = value; } + + /// + /// 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; } + + /// 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. + /// + private 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.Api20230201.ICloudError + /// 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.Api20230201.IRunCommandResult + /// 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 StartAzAksManagedClusterCommand_RunViaIdentityExpanded + public Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets.StartAzAksManagedClusterCommand_RunViaIdentityExpanded Clone() + { + var clone = new StartAzAksManagedClusterCommand_RunViaIdentityExpanded(); + 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._requestPayloadBody = this._requestPayloadBody; + return clone; + } + + /// Performs clean-up after the command execution + protected override void EndProcessing() + { + + } + + /// 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.DelayBeforePolling: + { + if (true == MyInvocation?.BoundParameters?.ContainsKey("NoWait")) + { + var data = messageData(); + 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; + } + } + 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 'ManagedClustersRunCommand' 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); + 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.ManagedClustersRunCommandViaIdentity(InputObject.Id, _requestPayloadBody, 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) ); + } + await this.Client.ManagedClustersRunCommand(InputObject.SubscriptionId ?? null, InputObject.ResourceGroupName ?? null, InputObject.ResourceName ?? null, _requestPayloadBody, 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 { body=_requestPayloadBody}) + { + 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); + } + } + } + + /// + /// Intializes a new instance of the cmdlet class. + /// + public StartAzAksManagedClusterCommand_RunViaIdentityExpanded() + { + + } + + /// Interrupts currently running code within the command. + protected override void StopProcessing() + { + ((Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener)this).Cancel(); + base.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.Api20230201.ICloudError + /// 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 { body=_requestPayloadBody }) + { + 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 { body=_requestPayloadBody }) + { + 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.Api20230201.IRunCommandResult + /// 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.Api20230201.IRunCommandResult + WriteObject((await response)); + } + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_Stop.cs b/src/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_Stop.cs index 5b180b0ad7de..f568257e6c78 100644 --- a/src/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_Stop.cs +++ b/src/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_Stop.cs @@ -8,13 +8,18 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; using System; - /// Stops a Running Managed Cluster + /// + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane + /// and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is + /// stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping + /// a cluster. + /// /// /// [OpenAPI] Stop=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzAksCluster_Stop", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Stops a Running Managed Cluster")] + [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] public partial class StopAzAksCluster_Stop : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener @@ -47,9 +52,10 @@ public partial class StopAzAksCluster_Stop : global::System.Management.Automatio public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// 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 credentials, account, tenant, and subscription used for communication with Azure.")] + [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)] @@ -132,12 +138,12 @@ public partial class StopAzAksCluster_Stop : global::System.Management.Automatio /// Backing field for property. private string _resourceGroupName; - /// The name of the resource group. - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The name of the resource group.")] + /// 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.", + 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)] @@ -146,15 +152,12 @@ public partial class StopAzAksCluster_Stop : global::System.Management.Automatio /// Backing field for property. private string _subscriptionId; - /// - /// Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI - /// for every service call. - /// - [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.")] + /// The ID of the target subscription. + [global::System.Management.Automation.Parameter(Mandatory = true, HelpMessage = "The ID of the target subscription.")] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Info( Required = true, ReadOnly = false, - Description = @"Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + Description = @"The ID of the target subscription.", SerializedName = @"subscriptionId", PossibleTypes = new [] { typeof(string) })] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo( @@ -169,12 +172,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 @@ -413,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 ) { @@ -435,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 { SubscriptionId=SubscriptionId, ResourceGroupName=ResourceGroupName, Name=Name }) { ErrorDetails = new global::System.Management.Automation.ErrorDetails(ex.Message) { RecommendedAction = ex.Action } diff --git a/src/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_StopViaIdentity.cs b/src/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_StopViaIdentity.cs index 5c72d9efe670..6aa853a96a1e 100644 --- a/src/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_StopViaIdentity.cs +++ b/src/Aks/Aks.Autorest/generated/cmdlets/StopAzAksCluster_StopViaIdentity.cs @@ -8,13 +8,18 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Cmdlets using static Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.Extensions; using System; - /// Stops a Running Managed Cluster + /// + /// This can only be performed on Azure Virtual Machine Scale set backed clusters. Stopping a cluster stops the control plane + /// and agent nodes entirely, while maintaining all object and cluster state. A cluster does not accrue charges while it is + /// stopped. See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping + /// a cluster. + /// /// /// [OpenAPI] Stop=>POST:"/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerService/managedClusters/{resourceName}/stop" /// [global::System.Management.Automation.Cmdlet(global::System.Management.Automation.VerbsLifecycle.Stop, @"AzAksCluster_StopViaIdentity", SupportsShouldProcess = true)] [global::System.Management.Automation.OutputType(typeof(bool))] - [global::Microsoft.Azure.PowerShell.Cmdlets.Aks.Description(@"Stops a Running Managed Cluster")] + [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] public partial class StopAzAksCluster_StopViaIdentity : global::System.Management.Automation.PSCmdlet, Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.IEventListener @@ -47,9 +52,10 @@ public partial class StopAzAksCluster_StopViaIdentity : global::System.Managemen public Microsoft.Azure.PowerShell.Cmdlets.Aks.Aks Client => Microsoft.Azure.PowerShell.Cmdlets.Aks.Module.Instance.ClientAPI; /// - /// The credentials, account, tenant, and subscription used for communication with Azure + /// 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 credentials, account, tenant, and subscription used for communication with Azure.")] + [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)] @@ -127,12 +133,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 @@ -388,12 +394,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.Api20200901.ICloudError + /// the body result as a Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ICloudError /// 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 ) { @@ -410,7 +416,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/src/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs b/src/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs index 802c95b74bb7..f276fbacf930 100644 --- a/src/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs +++ b/src/Aks/Aks.Autorest/generated/runtime/BuildTime/Models/PsProxyOutputs.cs @@ -199,7 +199,7 @@ private string GetTelemetry() { return $@" {Indent}{Indent}if ($null -eq [Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion) {{ -{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $Host.Version.ToString() +{Indent}{Indent}{Indent}[Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet]::PowerShellVersion = $PSVersionTable.PSVersion.ToString() {Indent}{Indent}}} {Indent}{Indent}$preTelemetryId = [Microsoft.WindowsAzure.Commands.Common.MetricHelper]::TelemetryId {Indent}{Indent}if ($preTelemetryId -eq '') {{ diff --git a/src/Aks/Aks.Autorest/generated/runtime/MessageAttributeHelper.cs b/src/Aks/Aks.Autorest/generated/runtime/MessageAttributeHelper.cs index 6e96e236a2b8..465bf08c5af2 100644 --- a/src/Aks/Aks.Autorest/generated/runtime/MessageAttributeHelper.cs +++ b/src/Aks/Aks.Autorest/generated/runtime/MessageAttributeHelper.cs @@ -23,6 +23,7 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime using System.Threading.Tasks; public class MessageAttributeHelper { + private static readonly bool IsAzure = Convert.ToBoolean(@"true"); public const string BREAKING_CHANGE_ATTRIBUTE_INFORMATION_LINK = "https://aka.ms/azps-changewarnings"; public const string SUPPRESS_ERROR_OR_WARNING_MESSAGE_ENV_VARIABLE_NAME = "SuppressAzurePowerShellBreakingChangeWarnings"; @@ -52,7 +53,10 @@ public static void ProcessCustomAttributesAtRuntime(CommandInfo commandInfo, Inv //Do not process the attributes at runtime... The env variable to override the warning messages is set return; } - + if (IsAzure && invocationInfo.BoundParameters.ContainsKey("DefaultProfile")) + { + psCmdlet.WriteWarning("The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription."); + } List attributes = new List(GetAllBreakingChangeAttributesInType(commandInfo, invocationInfo, parameterSet)); StringBuilder sb = new StringBuilder(); Action appendBreakingChangeInfo = (string s) => sb.Append(s); diff --git a/src/Aks/Aks.Autorest/internal/Get-AzAksContainerServiceOrchestrator.ps1 b/src/Aks/Aks.Autorest/internal/Get-AzAksContainerServiceOrchestrator.ps1 index 61d2c348f6ed..d8d9f199c142 100644 --- a/src/Aks/Aks.Autorest/internal/Get-AzAksContainerServiceOrchestrator.ps1 +++ b/src/Aks/Aks.Autorest/internal/Get-AzAksContainerServiceOrchestrator.ps1 @@ -45,8 +45,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. + # The ID of the target subscription. ${SubscriptionId}, [Parameter()] @@ -60,7 +59,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] diff --git a/src/Aks/Aks.Autorest/internal/Get-AzAksOperation.ps1 b/src/Aks/Aks.Autorest/internal/Get-AzAksOperation.ps1 index 521ff55a90ff..ded23db4f794 100644 --- a/src/Aks/Aks.Autorest/internal/Get-AzAksOperation.ps1 +++ b/src/Aks/Aks.Autorest/internal/Get-AzAksOperation.ps1 @@ -16,21 +16,21 @@ <# .Synopsis -Gets a list of compute operations. +Gets a list of operations. .Description -Gets a list of compute operations. +Gets a list of operations. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue .Link https://learn.microsoft.com/powershell/module/az.aks/get-azaksoperation #> function Get-AzAksOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -38,7 +38,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] diff --git a/src/Aks/Aks.Autorest/internal/ProxyCmdletDefinitions.ps1 b/src/Aks/Aks.Autorest/internal/ProxyCmdletDefinitions.ps1 index 6f174dabcbf8..c7b1123ff6b5 100644 --- a/src/Aks/Aks.Autorest/internal/ProxyCmdletDefinitions.ps1 +++ b/src/Aks/Aks.Autorest/internal/ProxyCmdletDefinitions.ps1 @@ -45,8 +45,7 @@ param( [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Path')] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.DefaultInfo(Script='(Get-AzContext).Subscription.Id')] [System.String[]] - # Subscription credentials which uniquely identify Microsoft Azure subscription. - # The subscription ID forms part of the URI for every service call. + # The ID of the target subscription. ${SubscriptionId}, [Parameter()] @@ -60,7 +59,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] @@ -150,21 +150,21 @@ end { <# .Synopsis -Gets a list of compute operations. +Gets a list of operations. .Description -Gets a list of compute operations. +Gets a list of operations. .Example {{ Add code here }} .Example {{ Add code here }} .Outputs -Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue +Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue .Link https://learn.microsoft.com/powershell/module/az.aks/get-azaksoperation #> function Get-AzAksOperation { -[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IOperationValue])] +[OutputType([Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOperationValue])] [CmdletBinding(DefaultParameterSetName='List', PositionalBinding=$false)] param( [Parameter()] @@ -172,7 +172,8 @@ param( [ValidateNotNull()] [Microsoft.Azure.PowerShell.Cmdlets.Aks.Category('Azure')] [System.Management.Automation.PSObject] - # The credentials, account, tenant, and subscription used for communication with Azure. + # The DefaultProfile parameter is not functional. + # Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ${DefaultProfile}, [Parameter(DontShow)] diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksMaintenanceConfiguration.Recording.json b/src/Aks/Aks.Autorest/test/Get-AzAksMaintenanceConfiguration.Recording.json new file mode 100644 index 000000000000..84b5ec8e443a --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Get-AzAksMaintenanceConfiguration.Recording.json @@ -0,0 +1,125 @@ +{ + "Get-AzAksMaintenanceConfiguration+[NoContext]+List+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "477f7dcd-021b-4225-98a2-2035d7ecf8b6" ], + "CommandName": [ "Get-AzAksMaintenanceConfiguration" ], + "FullCommandName": [ "Get-AzAksMaintenanceConfiguration_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "1171199f-3aea-4a4a-b6b5-b9784109d0ec" ], + "x-ms-request-id": [ "413f8854-aaa1-42db-bffd-8cf1302d757f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T091847Z:1171199f-3aea-4a4a-b6b5-b9784109d0ec" ], + "Date": [ "Thu, 30 Mar 2023 09:18:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "1088" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"value\": [\n {\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config1\",\n \"name\": \"aks_maintenance_config1\",\n \"properties\": {\n \"timeInWeek\": [\n {\n \"day\": \"Sunday\",\n \"hourSlots\": [\n 1,\n 2\n ]\n }\n ],\n \"notAllowedTime\": [\n {\n \"start\": \"2023-03-01T09:09:34.6774161Z\",\n \"end\": \"2023-03-02T09:09:34.6775164Z\"\n }\n ]\n }\n },\n {\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config2\",\n \"name\": \"aks_maintenance_config2\",\n \"properties\": {\n \"timeInWeek\": [\n {\n \"day\": \"Sunday\",\n \"hourSlots\": [\n 1,\n 2\n ]\n }\n ],\n \"notAllowedTime\": [\n {\n \"start\": \"2023-03-01T09:09:34.6774161Z\",\n \"end\": \"2023-03-02T09:09:34.6775164Z\"\n }\n ]\n }\n }\n ]\n }", + "isContentBase64": false + } + }, + "Get-AzAksMaintenanceConfiguration+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config1?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config1?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "da72dcea-d6dc-4821-9f3d-32b03f7c8f15" ], + "CommandName": [ "Get-AzAksMaintenanceConfiguration" ], + "FullCommandName": [ "Get-AzAksMaintenanceConfiguration_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "11700809-9aee-409e-9a9a-a1e6b2d6edf1" ], + "x-ms-request-id": [ "c49bf73e-a6db-421d-bbbc-8388f1c02b6a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T091847Z:11700809-9aee-409e-9a9a-a1e6b2d6edf1" ], + "Date": [ "Thu, 30 Mar 2023 09:18:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "489" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config1\",\n \"name\": \"aks_maintenance_config1\",\n \"properties\": {\n \"timeInWeek\": [\n {\n \"day\": \"Sunday\",\n \"hourSlots\": [\n 1,\n 2\n ]\n }\n ],\n \"notAllowedTime\": [\n {\n \"start\": \"2023-03-01T09:09:34.6774161Z\",\n \"end\": \"2023-03-02T09:09:34.6775164Z\"\n }\n ]\n }\n }", + "isContentBase64": false + } + }, + "Get-AzAksMaintenanceConfiguration+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config1?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config1?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "4365ca4f-c76f-4d12-b5b1-7c32b442e357" ], + "CommandName": [ "Get-AzAksMaintenanceConfiguration" ], + "FullCommandName": [ "Get-AzAksMaintenanceConfiguration_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "c0e8db0e-c2d3-4a0e-b991-1cbd9e261f44" ], + "x-ms-request-id": [ "2bf3e748-5a8e-4c59-b089-de27c08a7582" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T091848Z:c0e8db0e-c2d3-4a0e-b991-1cbd9e261f44" ], + "Date": [ "Thu, 30 Mar 2023 09:18:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "489" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config1\",\n \"name\": \"aks_maintenance_config1\",\n \"properties\": {\n \"timeInWeek\": [\n {\n \"day\": \"Sunday\",\n \"hourSlots\": [\n 1,\n 2\n ]\n }\n ],\n \"notAllowedTime\": [\n {\n \"start\": \"2023-03-01T09:09:34.6774161Z\",\n \"end\": \"2023-03-02T09:09:34.6775164Z\"\n }\n ]\n }\n }", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksMaintenanceConfiguration.Tests.ps1 b/src/Aks/Aks.Autorest/test/Get-AzAksMaintenanceConfiguration.Tests.ps1 new file mode 100644 index 000000000000..fdbe7d6128bb --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Get-AzAksMaintenanceConfiguration.Tests.ps1 @@ -0,0 +1,37 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAksMaintenanceConfiguration')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzAksMaintenanceConfiguration.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzAksMaintenanceConfiguration' { + It 'List' { + $MaintenanceConfigs = Get-AzAksMaintenanceConfiguration -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName + $MaintenanceConfigs.Count | Should -Be 2 + $MaintenanceConfigs.Name.Contains('aks_maintenance_config1') | Should -Be $true + $MaintenanceConfigs.Name.Contains('aks_maintenance_config2') | Should -Be $true + } + + It 'Get' { + $MaintenanceConfig = Get-AzAksMaintenanceConfiguration -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName -ConfigName 'aks_maintenance_config1' + $MaintenanceConfig.Count | Should -Be 1 + $MaintenanceConfig.Name | Should -Be 'aks_maintenance_config1' + } + + It 'GetViaIdentity' { + $InputObject = @{Id = "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config1" } + $MaintenanceConfig = Get-AzAksMaintenanceConfiguration -InputObject $InputObject + $MaintenanceConfig.Count | Should -Be 1 + $MaintenanceConfig.Name | Should -Be 'aks_maintenance_config1' + } +} diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterCommandResult.Recording.json b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterCommandResult.Recording.json new file mode 100644 index 000000000000..19546ac6da76 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterCommandResult.Recording.json @@ -0,0 +1,84 @@ +{ + "Get-AzAksManagedClusterCommandResult+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/commandResults/706de66629b14267b4962cf015122c12?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/commandResults/706de66629b14267b4962cf015122c12?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "5c10a838-a5b3-48dd-9d8a-abc1c55e98ec" ], + "CommandName": [ "Get-AzAksManagedClusterCommandResult" ], + "FullCommandName": [ "Get-AzAksManagedClusterCommandResult_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "85fe9439-cb35-4941-b66d-740ddeb2c6c9" ], + "x-ms-request-id": [ "cffa4110-004f-4a33-8af2-a402ebdf5855" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T092050Z:85fe9439-cb35-4941-b66d-740ddeb2c6c9" ], + "Date": [ "Fri, 31 Mar 2023 09:20:50 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "418" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"706de66629b14267b4962cf015122c12\",\n \"properties\": {\n \"provisioningState\": \"Succeeded\",\n \"exitCode\": 0,\n \"startedAt\": \"2023-03-31T09:14:38Z\",\n \"finishedAt\": \"2023-03-31T09:14:40Z\",\n \"logs\": \"NAME STATUS ROLES AGE VERSION\\naks-default-40136599-vmss000000 Ready agent 68m v1.24.9\\naks-pool2-22198594-vmss000000 Ready agent 65m v1.24.9\\n\"\n }\n }", + "isContentBase64": false + } + }, + "Get-AzAksManagedClusterCommandResult+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/commandResults/706de66629b14267b4962cf015122c12?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/commandResults/706de66629b14267b4962cf015122c12?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "8c6d7a5a-57f8-4a80-a7fe-e8867c1c88c4" ], + "CommandName": [ "Get-AzAksManagedClusterCommandResult" ], + "FullCommandName": [ "Get-AzAksManagedClusterCommandResult_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "24ac4275-f9e8-47ef-8f20-0339d1f8ac73" ], + "x-ms-request-id": [ "20c8c538-9503-4784-ba18-da325c8f77ae" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T092051Z:24ac4275-f9e8-47ef-8f20-0339d1f8ac73" ], + "Date": [ "Fri, 31 Mar 2023 09:20:51 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "418" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"706de66629b14267b4962cf015122c12\",\n \"properties\": {\n \"provisioningState\": \"Succeeded\",\n \"exitCode\": 0,\n \"startedAt\": \"2023-03-31T09:14:38Z\",\n \"finishedAt\": \"2023-03-31T09:14:40Z\",\n \"logs\": \"NAME STATUS ROLES AGE VERSION\\naks-default-40136599-vmss000000 Ready agent 68m v1.24.9\\naks-pool2-22198594-vmss000000 Ready agent 65m v1.24.9\\n\"\n }\n }", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterCommandResult.Tests.ps1 b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterCommandResult.Tests.ps1 new file mode 100644 index 000000000000..6038850e3d23 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterCommandResult.Tests.ps1 @@ -0,0 +1,38 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAksManagedClusterCommandResult')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzAksManagedClusterCommandResult.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzAksManagedClusterCommandResult' { + It 'Get' { + $CommandId = '706de66629b14267b4962cf015122c12' + $result = Get-AzAksManagedClusterCommandResult -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName -CommandId $CommandId + + $result.ProvisioningState | Should -Be 'Succeeded' + $result.ExitCode | Should -Be 0 + $result.Log.Contains("aks-default") | Should -Be $true + $result.Log.Contains("aks-pool2")| Should -Be $true + } + + It 'GetViaIdentity' { + $command = @{Id = "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/commandResults/706de66629b14267b4962cf015122c12"} + $result = Get-AzAksManagedClusterCommandResult -InputObject $command + + $result.ProvisioningState | Should -Be 'Succeeded' + $result.ExitCode | Should -Be 0 + $result.Log.Contains("aks-default") | Should -Be $true + $result.Log.Contains("aks-pool2")| Should -Be $true + + } +} diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOSOption.Recording.json b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOSOption.Recording.json new file mode 100644 index 000000000000..a96f8da6f748 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOSOption.Recording.json @@ -0,0 +1,43 @@ +{ + "Get-AzAksManagedClusterOSOption+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/osOptions/default?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/osOptions/default?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "1d40d7d8-ff03-433e-a396-3bc8007ef748" ], + "CommandName": [ "Get-AzAksManagedClusterOSOption" ], + "FullCommandName": [ "Get-AzAksManagedClusterOSOption_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "9e8a24fd-c9e9-4878-a473-e39cf7d098a6" ], + "x-ms-request-id": [ "867ab95a-64a7-4b1e-b024-66540434b06e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T093409Z:9e8a24fd-c9e9-4878-a473-e39cf7d098a6" ], + "Date": [ "Fri, 31 Mar 2023 09:34:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "744" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/osOptions/default\",\n \"name\": \"default\",\n \"type\": \"Microsoft.ContainerService/locations/osOptions\",\n \"properties\": {\n \"osOptionPropertyList\": [\n {\n \"os-type\": \"Linux\",\n \"os-sku\": \"Ubuntu\",\n \"enable-fips-image\": false\n },\n {\n \"os-type\": \"Linux\",\n \"os-sku\": \"Ubuntu\",\n \"enable-fips-image\": true\n },\n {\n \"os-type\": \"Windows\",\n \"os-sku\": \"\",\n \"enable-fips-image\": false\n },\n {\n \"os-type\": \"Windows\",\n \"os-sku\": \"\",\n \"enable-fips-image\": true\n },\n {\n \"os-type\": \"Linux\",\n \"os-sku\": \"CBLMariner\",\n \"enable-fips-image\": false\n }\n ]\n }\n }", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOSOption.Tests.ps1 b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOSOption.Tests.ps1 new file mode 100644 index 000000000000..a00ed5b62527 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOSOption.Tests.ps1 @@ -0,0 +1,27 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAksManagedClusterOSOption')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzAksManagedClusterOSOption.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzAksManagedClusterOSOption' { + It 'Get' { + $result = Get-AzAksManagedClusterOSOption -Location $env.location + $result.Name | Should -Be 'default' + $result.OSOptionPropertyList.Count | Should -Be 5 + } + + It 'GetViaIdentity' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.Recording.json b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.Recording.json new file mode 100644 index 000000000000..2071dcdcbe20 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.Recording.json @@ -0,0 +1,43 @@ +{ + "Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint+[NoContext]+List+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/outboundNetworkDependenciesEndpoints?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/outboundNetworkDependenciesEndpoints?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "83523d5a-aee3-4014-8a11-33e3d28fecb7" ], + "CommandName": [ "Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint" ], + "FullCommandName": [ "Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T094623Z:f05b1c48-ba0a-456e-9a59-59f153d4b494" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "f05b1c48-ba0a-456e-9a59-59f153d4b494" ], + "x-ms-request-id": [ "f787f783-2a3e-401c-8161-75b56a255c31" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "Date": [ "Fri, 31 Mar 2023 09:46:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2247" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"value\": [\n {\n \"category\": \"azure-resource-management\",\n \"endpoints\": [\n {\n \"domainName\": \"management.azure.com\",\n \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": \"Https\"\n }\n ]\n },\n {\n \"domainName\": \"login.microsoftonline.com\",\n \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": \"Https\"\n }\n ]\n }\n ]\n },\n {\n \"category\": \"images\",\n \"endpoints\": [\n {\n \"domainName\": \"mcr.microsoft.com\",\n \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": \"Https\"\n }\n ]\n },\n {\n \"domainName\": \"*.data.mcr.microsoft.com\",\n \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": \"Https\",\n \"description\": \"mcr cdn\"\n }\n ]\n }\n ]\n },\n {\n \"category\": \"artifacts\",\n \"endpoints\": [\n {\n \"domainName\": \"packages.microsoft.com\",\n \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": \"Https\"\n }\n ]\n },\n {\n \"domainName\": \"acs-mirror.azureedge.net\",\n \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": \"Https\"\n }\n ]\n }\n ]\n },\n {\n \"category\": \"time-sync\",\n \"endpoints\": [\n {\n \"domainName\": \"ntp.ubuntu.com\",\n \"endpointDetails\": [\n {\n \"port\": 123,\n \"protocol\": \"UDP\"\n }\n ]\n }\n ]\n },\n {\n \"category\": \"ubuntu-optional\",\n \"endpoints\": [\n {\n \"domainName\": \"security.ubuntu.com\",\n \"endpointDetails\": [\n {\n \"port\": 80,\n \"protocol\": \"Http\"\n }\n ]\n },\n {\n \"domainName\": \"azure.archive.ubuntu.com\",\n \"endpointDetails\": [\n {\n \"port\": 80,\n \"protocol\": \"Http\"\n }\n ]\n },\n {\n \"domainName\": \"changelogs.ubuntu.com\",\n \"endpointDetails\": [\n {\n \"port\": 80,\n \"protocol\": \"Http\"\n }\n ]\n }\n ]\n },\n {\n \"category\": \"apiserver\",\n \"endpoints\": [\n {\n \"domainName\": \"aks0b1f-idb7vuoi.hcp.eastus.azmk8s.io\",\n \"endpointDetails\": [\n {\n \"port\": 443,\n \"protocol\": \"Https\"\n }\n ]\n }\n ]\n }\n ]\n }", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.Tests.ps1 b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.Tests.ps1 new file mode 100644 index 000000000000..ef4f88d48d9c --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.Tests.ps1 @@ -0,0 +1,35 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint' { + It 'List' { + $result = Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName + $result.Count | Should -Be 6 + $result.Category.Contains("azure-resource-management") | Should -Be $true + $result.Category.Contains("images") | Should -Be $true + $result.Category.Contains("artifacts") | Should -Be $true + $result.Category.Contains("time-sync") | Should -Be $true + $result.Category.Contains("ubuntu-optional") | Should -Be $true + $result.Category.Contains("apiserver") | Should -Be $true + + ($result | Where Category -eq "azure-resource-management").Endpoint.DomainName.Contains("management.azure.com") | Should -Be $true + ($result | Where Category -eq "azure-resource-management").Endpoint.DomainName.Contains("login.microsoftonline.com") | Should -Be $true + (($result | Where Category -eq "azure-resource-management").Endpoint | where DomainName -eq "management.azure.com").EndpointDetail.Protocol | Should -Be 'Https' + (($result | Where Category -eq "azure-resource-management").Endpoint | where DomainName -eq "management.azure.com").EndpointDetail.Port | Should -Be 443 + ($result | Where Category -eq "apiserver").Endpoint.EndpointDetail.Protocol | Should -Be 'Https' + ($result | Where Category -eq "apiserver").Endpoint.EndpointDetail.Port | Should -Be 443 + } +} diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksNodePoolUpgradeProfile.Recording.json b/src/Aks/Aks.Autorest/test/Get-AzAksNodePoolUpgradeProfile.Recording.json index 04eef4689c07..df45087edc28 100644 --- a/src/Aks/Aks.Autorest/test/Get-AzAksNodePoolUpgradeProfile.Recording.json +++ b/src/Aks/Aks.Autorest/test/Get-AzAksNodePoolUpgradeProfile.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzAksNodePoolUpgradeProfile+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default/upgradeProfiles/default?api-version=2020-09-01+1": { + "Get-AzAksNodePoolUpgradeProfile+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default/upgradeProfiles/default?api-version=2023-02-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default/upgradeProfiles/default?api-version=2020-09-01", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default/upgradeProfiles/default?api-version=2023-02-01", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "1" ], - "x-ms-client-request-id": [ "c68f6f77-0b6f-4827-b747-35684f2feb11" ], + "x-ms-client-request-id": [ "e995b955-a1d6-471f-a628-5947e5717a70" ], "CommandName": [ "Get-AzAksNodePoolUpgradeProfile" ], "FullCommandName": [ "Get-AzAksNodePoolUpgradeProfile_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,21 +22,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], - "x-ms-correlation-request-id": [ "d4270e69-4048-429e-9502-976fbb79d4cf" ], - "x-ms-request-id": [ "516ba672-b585-402e-9330-630467ccf3fb" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], + "x-ms-correlation-request-id": [ "facf4fab-89f9-4eef-bcfd-9cdc8bbfd55f" ], + "x-ms-request-id": [ "d207c51f-abf8-44a9-9757-8a1580b4d5cf" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T064942Z:d4270e69-4048-429e-9502-976fbb79d4cf" ], - "Date": [ "Wed, 07 Jul 2021 06:49:42 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083459Z:facf4fab-89f9-4eef-bcfd-9cdc8bbfd55f" ], + "Date": [ "Wed, 29 Mar 2023 08:34:58 GMT" ] }, "ContentHeaders": { "Content-Length": [ "441" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default/upgradeProfiles/default\",\n \"name\": \"default\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools/upgradeProfiles\",\n \"properties\": {\n \"kubernetesVersion\": \"1.19.11\",\n \"osType\": \"Linux\",\n \"latestNodeImageVersion\": \"AKSUbuntu-1804containerd-2021.06.09\"\n }\n }", + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default/upgradeProfiles/default\",\n \"name\": \"default\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools/upgradeProfiles\",\n \"properties\": {\n \"kubernetesVersion\": \"1.24.9\",\n \"osType\": \"Linux\",\n \"latestNodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\"\n }\n }", "isContentBase64": false } } diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksSnapshot.Recording.json b/src/Aks/Aks.Autorest/test/Get-AzAksSnapshot.Recording.json new file mode 100644 index 000000000000..cde1d0a1e75e --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Get-AzAksSnapshot.Recording.json @@ -0,0 +1,166 @@ +{ + "Get-AzAksSnapshot+[NoContext]+List+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/snapshots?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/snapshots?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "83085859-cdc3-41ad-acdd-50c26f705b57" ], + "CommandName": [ "Get-AzAksSnapshot" ], + "FullCommandName": [ "Get-AzAksSnapshot_List" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T101620Z:499057d4-f298-4260-b181-745ffc75969a" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-correlation-request-id": [ "499057d4-f298-4260-b181-745ffc75969a" ], + "x-ms-request-id": [ "d4659b62-af2b-44ab-a424-65999a77078d" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "Date": [ "Thu, 30 Mar 2023 10:16:20 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3005" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"value\": [\n {\n \"name\": \"snapshot1\",\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1\",\n \"type\": \"Microsoft.ContainerService/Snapshots\",\n \"location\": \"eastus\",\n \"systemData\": {\n \"createdBy\": \"yanxu1@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\": \"2023-03-30T10:09:35.2240768Z\",\n \"lastModifiedBy\": \"yanxu1@microsoft.com\",\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2023-03-30T10:09:35.2240768Z\"\n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\n },\n \"snapshotType\": \"NodePool\",\n \"kubernetesVersion\": \"1.24.9\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"osType\": \"Linux\",\n \"osSku\": \"Ubuntu\",\n \"vmSize\": \"Standard_D2_v2\"\n }\n },\n {\n \"name\": \"snapshot2\",\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot2\",\n \"type\": \"Microsoft.ContainerService/Snapshots\",\n \"location\": \"eastus\",\n \"systemData\": {\n \"createdBy\": \"yanxu1@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\": \"2023-03-30T10:09:38.1460107Z\",\n \"lastModifiedBy\": \"yanxu1@microsoft.com\",\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2023-03-30T10:09:38.1460107Z\"\n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\n },\n \"snapshotType\": \"NodePool\",\n \"kubernetesVersion\": \"1.24.9\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"osType\": \"Linux\",\n \"osSku\": \"Ubuntu\",\n \"vmSize\": \"Standard_D2_v2\"\n }\n },\n {\n \"name\": \"snapshot3\",\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test2/providers/Microsoft.ContainerService/snapshots/snapshot3\",\n \"type\": \"Microsoft.ContainerService/Snapshots\",\n \"location\": \"eastus\",\n \"systemData\": {\n \"createdBy\": \"yanxu1@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\": \"2023-03-30T10:11:24.72674Z\",\n \"lastModifiedBy\": \"yanxu1@microsoft.com\",\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2023-03-30T10:11:24.72674Z\"\n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\n },\n \"snapshotType\": \"NodePool\",\n \"kubernetesVersion\": \"1.24.9\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"osType\": \"Linux\",\n \"osSku\": \"Ubuntu\",\n \"vmSize\": \"Standard_D2_v2\"\n }\n }\n ]\n }", + "isContentBase64": false + } + }, + "Get-AzAksSnapshot+[NoContext]+List1+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "1fb7acd7-edd4-4210-88c0-f336b3315e15" ], + "CommandName": [ "Get-AzAksSnapshot" ], + "FullCommandName": [ "Get-AzAksSnapshot_List1" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "fa207895-b30b-4208-bc0e-b2e2b7ea5a42" ], + "x-ms-request-id": [ "0c52d236-eb88-48fc-862f-f09585fd3dc1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T101622Z:fa207895-b30b-4208-bc0e-b2e2b7ea5a42" ], + "Date": [ "Thu, 30 Mar 2023 10:16:21 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "2012" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"value\": [\n {\n \"name\": \"snapshot1\",\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1\",\n \"type\": \"Microsoft.ContainerService/Snapshots\",\n \"location\": \"eastus\",\n \"systemData\": {\n \"createdBy\": \"yanxu1@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\": \"2023-03-30T10:09:35.2240768Z\",\n \"lastModifiedBy\": \"yanxu1@microsoft.com\",\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2023-03-30T10:09:35.2240768Z\"\n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\n },\n \"snapshotType\": \"NodePool\",\n \"kubernetesVersion\": \"1.24.9\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"osType\": \"Linux\",\n \"osSku\": \"Ubuntu\",\n \"vmSize\": \"Standard_D2_v2\"\n }\n },\n {\n \"name\": \"snapshot2\",\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot2\",\n \"type\": \"Microsoft.ContainerService/Snapshots\",\n \"location\": \"eastus\",\n \"systemData\": {\n \"createdBy\": \"yanxu1@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\": \"2023-03-30T10:09:38.1460107Z\",\n \"lastModifiedBy\": \"yanxu1@microsoft.com\",\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2023-03-30T10:09:38.1460107Z\"\n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\n },\n \"snapshotType\": \"NodePool\",\n \"kubernetesVersion\": \"1.24.9\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"osType\": \"Linux\",\n \"osSku\": \"Ubuntu\",\n \"vmSize\": \"Standard_D2_v2\"\n }\n }\n ]\n }", + "isContentBase64": false + } + }, + "Get-AzAksSnapshot+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "e09c4d92-7e97-4679-ace5-43209b3ecabd" ], + "CommandName": [ "Get-AzAksSnapshot" ], + "FullCommandName": [ "Get-AzAksSnapshot_Get" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-correlation-request-id": [ "f927ee6c-9358-4906-85ef-645467c927e2" ], + "x-ms-request-id": [ "a6002970-c3a2-4c58-8208-17906d4766c0" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T101622Z:f927ee6c-9358-4906-85ef-645467c927e2" ], + "Date": [ "Thu, 30 Mar 2023 10:16:22 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "943" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"snapshot1\",\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1\",\n \"type\": \"Microsoft.ContainerService/Snapshots\",\n \"location\": \"eastus\",\n \"systemData\": {\n \"createdBy\": \"yanxu1@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\": \"2023-03-30T10:09:35.2240768Z\",\n \"lastModifiedBy\": \"yanxu1@microsoft.com\",\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2023-03-30T10:09:35.2240768Z\"\n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\n },\n \"snapshotType\": \"NodePool\",\n \"kubernetesVersion\": \"1.24.9\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"osType\": \"Linux\",\n \"osSku\": \"Ubuntu\",\n \"vmSize\": \"Standard_D2_v2\"\n }\n }", + "isContentBase64": false + } + }, + "Get-AzAksSnapshot+[NoContext]+GetViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01+1": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "312e553c-98c2-4eca-b442-0739fe4e5090" ], + "CommandName": [ "Get-AzAksSnapshot" ], + "FullCommandName": [ "Get-AzAksSnapshot_GetViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-correlation-request-id": [ "3e4dc256-7d48-4acb-a81e-edcd13049044" ], + "x-ms-request-id": [ "4917d28b-0f40-4cbe-a8b0-99a2ec5c8cf9" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T101623Z:3e4dc256-7d48-4acb-a81e-edcd13049044" ], + "Date": [ "Thu, 30 Mar 2023 10:16:23 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "943" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"snapshot1\",\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1\",\n \"type\": \"Microsoft.ContainerService/Snapshots\",\n \"location\": \"eastus\",\n \"systemData\": {\n \"createdBy\": \"yanxu1@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\": \"2023-03-30T10:09:35.2240768Z\",\n \"lastModifiedBy\": \"yanxu1@microsoft.com\",\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2023-03-30T10:09:35.2240768Z\"\n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\n },\n \"snapshotType\": \"NodePool\",\n \"kubernetesVersion\": \"1.24.9\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"osType\": \"Linux\",\n \"osSku\": \"Ubuntu\",\n \"vmSize\": \"Standard_D2_v2\"\n }\n }", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksSnapshot.Tests.ps1 b/src/Aks/Aks.Autorest/test/Get-AzAksSnapshot.Tests.ps1 new file mode 100644 index 000000000000..bbc5e8de2b35 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Get-AzAksSnapshot.Tests.ps1 @@ -0,0 +1,45 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Get-AzAksSnapshot')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Get-AzAksSnapshot.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Get-AzAksSnapshot' { + It 'List' { + $Snapshot = Get-AzAksSnapshot + $Snapshot.Count | Should -Be 3 + $Snapshot.Name.Contains('snapshot1') | Should -Be $true + $Snapshot.Name.Contains('snapshot2') | Should -Be $true + $Snapshot.Name.Contains('snapshot3') | Should -Be $true + } + + It 'List1' { + $Snapshot = Get-AzAksSnapshot -ResourceGroupName $env.ResourceGroupName + $Snapshot.Count | Should -Be 2 + $Snapshot.Name.Contains('snapshot1') | Should -Be $true + $Snapshot.Name.Contains('snapshot2') | Should -Be $true + } + + It 'Get' { + $Snapshot = Get-AzAksSnapshot -ResourceGroupName $env.ResourceGroupName -ResourceName 'snapshot1' + $Snapshot.Count | Should -Be 1 + $Snapshot.Name.Contains('snapshot1') | Should -Be $true + } + + It 'GetViaIdentity' { + $InputObject = @{Id = "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1" } + $Snapshot = Get-AzAksSnapshot -InputObject $InputObject + $Snapshot.Count | Should -Be 1 + $Snapshot.Name.Contains('snapshot1') | Should -Be $true + } +} diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksUpgradeProfile.Recording.json b/src/Aks/Aks.Autorest/test/Get-AzAksUpgradeProfile.Recording.json index 84b820f3cb68..ed99125119a3 100644 --- a/src/Aks/Aks.Autorest/test/Get-AzAksUpgradeProfile.Recording.json +++ b/src/Aks/Aks.Autorest/test/Get-AzAksUpgradeProfile.Recording.json @@ -1,17 +1,17 @@ { - "Get-AzAksUpgradeProfile+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/upgradeProfiles/default?api-version=2020-09-01+1": { + "Get-AzAksUpgradeProfile+[NoContext]+Get+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/upgradeProfiles/default?api-version=2023-02-01+1": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/upgradeProfiles/default?api-version=2020-09-01", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/upgradeProfiles/default?api-version=2023-02-01", "Content": null, "isContentBase64": false, "Headers": { "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "424b8ce4-d338-4b56-a425-43577bfaedda" ], + "x-ms-client-request-id": [ "23848c75-5757-4e1a-834b-d8b249f01c7f" ], "CommandName": [ "Get-AzAksUpgradeProfile" ], "FullCommandName": [ "Get-AzAksUpgradeProfile_Get" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,21 +22,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "abdb517b-0d1f-4f9c-9d30-801bf5ccf653" ], - "x-ms-request-id": [ "dc1c2f4d-8fb5-4493-a385-44e158d49421" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], + "x-ms-correlation-request-id": [ "68563c3b-d302-4d8e-97dd-f312f24e89e0" ], + "x-ms-request-id": [ "8863bf8a-2aff-454a-b9d5-e11b30508349" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T064943Z:abdb517b-0d1f-4f9c-9d30-801bf5ccf653" ], - "Date": [ "Wed, 07 Jul 2021 06:49:43 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083500Z:68563c3b-d302-4d8e-97dd-f312f24e89e0" ], + "Date": [ "Wed, 29 Mar 2023 08:35:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "534" ], + "Content-Length": [ "533" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"id\": \"/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/upgradeprofiles/default\",\n \"name\": \"default\",\n \"type\": \"Microsoft.ContainerService/managedClusters/upgradeprofiles\",\n \"properties\": {\n \"controlPlaneProfile\": {\n \"kubernetesVersion\": \"1.19.11\",\n \"osType\": \"Linux\",\n \"upgrades\": [\n {\n \"kubernetesVersion\": \"1.20.5\"\n },\n {\n \"kubernetesVersion\": \"1.20.7\"\n }\n ]\n },\n \"agentPoolProfiles\": null\n }\n }", + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/upgradeprofiles/default\",\n \"name\": \"default\",\n \"type\": \"Microsoft.ContainerService/managedClusters/upgradeprofiles\",\n \"properties\": {\n \"controlPlaneProfile\": {\n \"kubernetesVersion\": \"1.24.9\",\n \"osType\": \"Linux\",\n \"upgrades\": [\n {\n \"kubernetesVersion\": \"1.25.4\"\n },\n {\n \"kubernetesVersion\": \"1.25.5\"\n }\n ]\n },\n \"agentPoolProfiles\": null\n }\n }", "isContentBase64": false } } diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksVersion.Recording.json b/src/Aks/Aks.Autorest/test/Get-AzAksVersion.Recording.json index a5e33578b09a..13b7ddbc24a5 100644 --- a/src/Aks/Aks.Autorest/test/Get-AzAksVersion.Recording.json +++ b/src/Aks/Aks.Autorest/test/Get-AzAksVersion.Recording.json @@ -6,12 +6,12 @@ "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "2" ], - "x-ms-client-request-id": [ "daf60044-75de-4829-a54d-b3933a9b3b8d" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "67deb677-a4d6-482d-b319-a2d7b9494e94" ], "CommandName": [ "Az.Aks.internal\\Get-AzAksContainerServiceOrchestrator" ], "FullCommandName": [ "Get-AzAksContainerServiceOrchestrator_List" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/v0.0.0" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,21 +22,21 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20211119T091914Z:6a225942-c4b9-413c-b460-e6b6b35a0c17" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], - "x-ms-correlation-request-id": [ "6a225942-c4b9-413c-b460-e6b6b35a0c17" ], - "x-ms-request-id": [ "b4669d50-cc49-4471-be37-da45fbd21d4d" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083501Z:adea5d6f-b7bd-473c-a39e-f420eed162ff" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], + "x-ms-correlation-request-id": [ "adea5d6f-b7bd-473c-a39e-f420eed162ff" ], + "x-ms-request-id": [ "f903e123-d935-4a88-8358-b042e1842354" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "Date": [ "Fri, 19 Nov 2021 09:19:13 GMT" ] + "Date": [ "Wed, 29 Mar 2023 08:35:00 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "2917" ], + "Content-Length": [ "2409" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/orchestrators\",\n \"name\": \"default\",\n \"type\": \"Microsoft.ContainerService/locations/orchestrators\",\n \"properties\": {\n \"orchestrators\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.19.11\",\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.19.13\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.20.7\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.20.9\"\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.19.13\",\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.20.7\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.20.9\"\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.20.7\",\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.20.9\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.1\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.2\"\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.20.9\",\n \"default\": true,\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.1\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.2\"\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.1\",\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.2\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.22.1\",\n \"isPreview\": true\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.22.2\",\n \"isPreview\": true\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.21.2\",\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.22.1\",\n \"isPreview\": true\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.22.2\",\n \"isPreview\": true\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.22.1\",\n \"isPreview\": true,\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.22.2\",\n \"isPreview\": true\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.22.2\",\n \"isPreview\": true\n }\n ]\n }\n }", + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/orchestrators\",\n \"name\": \"default\",\n \"type\": \"Microsoft.ContainerService/locations/orchestrators\",\n \"properties\": {\n \"orchestrators\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.23.12\",\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.23.15\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.24.6\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.24.9\"\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.23.15\",\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.24.6\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.24.9\"\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.24.6\",\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.24.9\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.25.4\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.25.5\"\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.24.9\",\n \"default\": true,\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.25.4\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.25.5\"\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.25.4\",\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.25.5\"\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.26.0\",\n \"isPreview\": true\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.25.5\",\n \"upgrades\": [\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.26.0\",\n \"isPreview\": true\n }\n ]\n },\n {\n \"orchestratorType\": \"Kubernetes\",\n \"orchestratorVersion\": \"1.26.0\",\n \"isPreview\": true\n }\n ]\n }\n }", "isContentBase64": false } } diff --git a/src/Aks/Aks.Autorest/test/Get-AzAksVersion.Tests.ps1 b/src/Aks/Aks.Autorest/test/Get-AzAksVersion.Tests.ps1 index 15f713402e71..93cdccca0a0b 100644 --- a/src/Aks/Aks.Autorest/test/Get-AzAksVersion.Tests.ps1 +++ b/src/Aks/Aks.Autorest/test/Get-AzAksVersion.Tests.ps1 @@ -15,11 +15,11 @@ Describe 'Get-AzAksVersion' { It 'Get' { $version = Get-AzAksVersion -Location eastus - $version.Count | Should -Be 8 + $version.Count | Should -Be 7 - $chosenVersion = $version | Where-Object { $_.OrchestratorVersion -eq '1.19.11'} - $chosenVersion.OrchestratorVersion | Should -Be '1.19.11' + $chosenVersion = $version | Where-Object { $_.OrchestratorVersion -eq '1.23.12'} + $chosenVersion.OrchestratorVersion | Should -Be '1.23.12' $chosenVersion.Upgrade.Count | Should -Be 3 - $chosenVersion.Upgrade[0].OrchestratorVersion | Should -Be '1.19.13' + $chosenVersion.Upgrade[0].OrchestratorVersion | Should -Be '1.23.15' } } diff --git a/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortAgentPoolLatestOperation.Recording.json b/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortAgentPoolLatestOperation.Recording.json new file mode 100644 index 000000000000..ceacb4b1f676 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortAgentPoolLatestOperation.Recording.json @@ -0,0 +1,252 @@ +{ + "Invoke-AzAksAbortAgentPoolLatestOperation+[NoContext]+Abort+$POST+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/agentPools/cancelpool1/abort?api-version=2023-02-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/agentPools/cancelpool1/abort?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "4c967133-9479-4335-a1c8-b7f0691ec4f5" ], + "CommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation_Abort" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/b6deabb5-244e-4d0d-81f0-89d67cebb28c?api-version=2017-08-31" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "azure-asyncoperation": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/b6deabb5-244e-4d0d-81f0-89d67cebb28c?api-version=2017-08-31" ], + "x-ms-correlation-request-id": [ "d4143b92-e30b-4056-9d82-5ca4500fb3ac" ], + "x-ms-request-id": [ "b6deabb5-244e-4d0d-81f0-89d67cebb28c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T095601Z:d4143b92-e30b-4056-9d82-5ca4500fb3ac" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Fri, 31 Mar 2023 09:56:00 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "808" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/cancelpool1\",\n \"name\": \"cancelpool1\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"User\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n }\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksAbortAgentPoolLatestOperation+[NoContext]+Abort+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/b6deabb5-244e-4d0d-81f0-89d67cebb28c?api-version=2017-08-31+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/b6deabb5-244e-4d0d-81f0-89d67cebb28c?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "4c967133-9479-4335-a1c8-b7f0691ec4f5" ], + "CommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation_Abort" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "80481e0b-d5b9-44f9-8682-6ddcd1b7fbb7" ], + "x-ms-request-id": [ "f3ac7af5-9b0b-4e57-b5d4-9755fec0a9e1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T095631Z:80481e0b-d5b9-44f9-8682-6ddcd1b7fbb7" ], + "Date": [ "Fri, 31 Mar 2023 09:56:31 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "170" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"b5abdeb6-4e24-0d4d-81f0-89d67cebb28c\",\n \"status\": \"Succeeded\",\n \"startTime\": \"2023-03-31T09:56:01.0156825Z\",\n \"endTime\": \"2023-03-31T09:56:08.5241135Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksAbortAgentPoolLatestOperation+[NoContext]+Abort+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/b6deabb5-244e-4d0d-81f0-89d67cebb28c?api-version=2017-08-31+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/b6deabb5-244e-4d0d-81f0-89d67cebb28c?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "4c967133-9479-4335-a1c8-b7f0691ec4f5" ], + "CommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation_Abort" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/b6deabb5-244e-4d0d-81f0-89d67cebb28c?api-version=2017-08-31" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "f316bf1f-3bd1-4b1e-8c71-7abc2d6217e9" ], + "x-ms-request-id": [ "b095820d-a045-452f-9a7d-ee3059a9f6a6" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T095632Z:f316bf1f-3bd1-4b1e-8c71-7abc2d6217e9" ], + "Date": [ "Fri, 31 Mar 2023 09:56:31 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "Invoke-AzAksAbortAgentPoolLatestOperation+[NoContext]+AbortViaIdentity+$POST+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/agentPools/cancelpool2/abort?api-version=2023-02-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/agentPools/cancelpool2/abort?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "4002b6be-11e7-4013-b1f8-881f0e93c045" ], + "CommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation_AbortViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/a835bc61-0d4f-467d-83fe-7c3a27377b50?api-version=2017-08-31" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "azure-asyncoperation": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a835bc61-0d4f-467d-83fe-7c3a27377b50?api-version=2017-08-31" ], + "x-ms-correlation-request-id": [ "0d3d4c1f-6327-426b-b125-470266034d8f" ], + "x-ms-request-id": [ "a835bc61-0d4f-467d-83fe-7c3a27377b50" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T095632Z:0d3d4c1f-6327-426b-b125-470266034d8f" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Fri, 31 Mar 2023 09:56:32 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "808" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/cancelpool2\",\n \"name\": \"cancelpool2\",\n \"type\": \"Microsoft.ContainerService/managedClusters/agentPools\",\n \"properties\": {\n \"count\": 1,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Creating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"User\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n }\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksAbortAgentPoolLatestOperation+[NoContext]+AbortViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a835bc61-0d4f-467d-83fe-7c3a27377b50?api-version=2017-08-31+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a835bc61-0d4f-467d-83fe-7c3a27377b50?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "4002b6be-11e7-4013-b1f8-881f0e93c045" ], + "CommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation_AbortViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "b786ce8c-fea1-4088-9fbe-d62a4db1e6f7" ], + "x-ms-request-id": [ "6588c673-cab8-430d-97e7-231b396ddb89" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T095703Z:b786ce8c-fea1-4088-9fbe-d62a4db1e6f7" ], + "Date": [ "Fri, 31 Mar 2023 09:57:03 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "170" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"61bc35a8-4f0d-7d46-83fe-7c3a27377b50\",\n \"status\": \"Succeeded\",\n \"startTime\": \"2023-03-31T09:56:32.7032077Z\",\n \"endTime\": \"2023-03-31T09:56:38.7103113Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksAbortAgentPoolLatestOperation+[NoContext]+AbortViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/a835bc61-0d4f-467d-83fe-7c3a27377b50?api-version=2017-08-31+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/a835bc61-0d4f-467d-83fe-7c3a27377b50?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "4002b6be-11e7-4013-b1f8-881f0e93c045" ], + "CommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortAgentPoolLatestOperation_AbortViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/a835bc61-0d4f-467d-83fe-7c3a27377b50?api-version=2017-08-31" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "8d86e6eb-9e73-42ff-9bcd-274bb783ecd0" ], + "x-ms-request-id": [ "cdda0c08-3f05-48fb-bc15-eb059bd7628e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T095703Z:8d86e6eb-9e73-42ff-9bcd-274bb783ecd0" ], + "Date": [ "Fri, 31 Mar 2023 09:57:03 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortAgentPoolLatestOperation.Tests.ps1 b/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortAgentPoolLatestOperation.Tests.ps1 new file mode 100644 index 000000000000..f28c671ed70d --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortAgentPoolLatestOperation.Tests.ps1 @@ -0,0 +1,26 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzAksAbortAgentPoolLatestOperation')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzAksAbortAgentPoolLatestOperation.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzAksAbortAgentPoolLatestOperation' { + It 'Abort' { + Invoke-AzAksAbortAgentPoolLatestOperation -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName -AgentPoolName 'cancelpool1' + } + + It 'AbortViaIdentity' { + $pool = @{Id="/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/cancelpool2"} + Invoke-AzAksAbortAgentPoolLatestOperation -InputObject $pool + } +} diff --git a/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortManagedClusterLatestOperation.Recording.json b/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortManagedClusterLatestOperation.Recording.json new file mode 100644 index 000000000000..d7a57ac0bf92 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortManagedClusterLatestOperation.Recording.json @@ -0,0 +1,252 @@ +{ + "Invoke-AzAksAbortManagedClusterLatestOperation+[NoContext]+Abort+$POST+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/abort?api-version=2023-02-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/abort?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "64d26905-6cd2-43dc-95b1-5373fabf72c1" ], + "CommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation_Abort" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/d8d7c50b-05e7-4485-803f-50e0af8eab35?api-version=2017-08-31" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T101015Z:664faf46-ced4-4be4-94b8-db454926a37d" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "azure-asyncoperation": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/d8d7c50b-05e7-4485-803f-50e0af8eab35?api-version=2017-08-31" ], + "x-ms-correlation-request-id": [ "664faf46-ced4-4be4-94b8-db454926a37d" ], + "x-ms-request-id": [ "d8d7c50b-05e7-4485-803f-50e0af8eab35" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "nginx" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Fri, 31 Mar 2023 10:10:15 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "6330" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks\",\n \"location\": \"eastus\",\n \"name\": \"aks\",\n \"type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": \"1.24.9\",\n \"currentKubernetesVersion\": \"1.24.9\",\n \"dnsPrefix\": \"aks0b1f\",\n \"fqdn\": \"aks0b1f-idb7vuoi.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": \"aks0b1f-idb7vuoi.portal.hcp.eastus.azmk8s.io\",\n \"agentPoolProfiles\": [\n {\n \"name\": \"cancelpool1\",\n \"count\": 1,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"User\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n },\n {\n \"name\": \"cancelpool2\",\n \"count\": 1,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"User\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n },\n {\n \"name\": \"default\",\n \"count\": 3,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n },\n {\n \"name\": \"pool2\",\n \"count\": 1,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"User\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n },\n {\n \"name\": \"pool3\",\n \"count\": 1,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"User\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n },\n {\n \"name\": \"pool4\",\n \"count\": 1,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"scaleDownMode\": \"Delete\",\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"User\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKqmxYucPFYdhu0O/x3coL2G3XHy+o5XvGJUteWoquL2Bd1ZyAIKKR+Pgv+jK5N8GRnNKrvK6zWEzuQiIrgrVUIFy7JIv20MSk2NmxWERZpOCdVDNMKQq22Lcsz6iTX31ixEI6cFGOh5RrZq87oPrqIc/O1HqPWfgYO2Jjhfzec/pKaNXklw8k2cquk3ykvgvaln4KFGL6tMe8+osW1bQZDynlt/4uApg3k3VoCJTYypi4vsAqqN1Kgbx3pTTgfNA3EwLy3wnsT6p3gjeptOeWonh3MpBa4djXho14nPMhr32wvudHZWVLODwGEyiGTTY2RH793QZMTbvVLfTV1wi16KezfN+AzMRZzdCJ2HIwGaYq4A2QLZidnwouPp1M5uLaI+Cn+O3J0kFQfi4SkRS6llguMeDsu1MeXhCwJC+4ehlmxw3RNOaGXqvVK5o4ff3kNXKr8AMOEUd3az+2A8QCYoc5uNjPxEwl4ZU+gPF795RBtcLzlz4pmwY3CV4z6ik= fareast\\\\yanxu1@yanxu1\\r\\n\"\n }\n ]\n }\n },\n \"windowsProfile\": {\n \"adminUsername\": \"azureuser\",\n \"enableCSIProxy\": true\n },\n \"servicePrincipalProfile\": {\n \"clientId\": \"b6fe7f21-8eb3-4d62-acab-b089c80c11e9\"\n },\n \"addonProfiles\": {\n \"keda\": {\n \"enabled\": true,\n \"config\": {\n \"addonv2\": \"true\"\n }\n }\n },\n \"nodeResourceGroup\": \"MC_aks-test_aks_eastus\",\n \"enableRBAC\": true,\n \"networkProfile\": {\n \"networkPlugin\": \"azure\",\n \"networkDataplane\": \"azure\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/MC_aks-test_aks_eastus/providers/Microsoft.Network/publicIPAddresses/da08011a-37cd-43fe-8345-9548c2674639\"\n }\n ]\n },\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\": 100,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n },\n \"workloadAutoScalerProfile\": {}\n },\n \"sku\": {\n \"name\": \"Base\",\n \"tier\": \"Free\"\n }\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksAbortManagedClusterLatestOperation+[NoContext]+Abort+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/d8d7c50b-05e7-4485-803f-50e0af8eab35?api-version=2017-08-31+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/d8d7c50b-05e7-4485-803f-50e0af8eab35?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "64d26905-6cd2-43dc-95b1-5373fabf72c1" ], + "CommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation_Abort" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "4ea30bdb-6a10-4d88-baad-d1bedd5ddb19" ], + "x-ms-request-id": [ "fd899f96-a790-4d03-8abb-0af1a6bb72a3" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T101046Z:4ea30bdb-6a10-4d88-baad-d1bedd5ddb19" ], + "Date": [ "Fri, 31 Mar 2023 10:10:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "170" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"0bc5d7d8-e705-8544-803f-50e0af8eab35\",\n \"status\": \"Succeeded\",\n \"startTime\": \"2023-03-31T10:10:15.5627753Z\",\n \"endTime\": \"2023-03-31T10:10:20.6922786Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksAbortManagedClusterLatestOperation+[NoContext]+Abort+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/d8d7c50b-05e7-4485-803f-50e0af8eab35?api-version=2017-08-31+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/d8d7c50b-05e7-4485-803f-50e0af8eab35?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "64d26905-6cd2-43dc-95b1-5373fabf72c1" ], + "CommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation_Abort" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/d8d7c50b-05e7-4485-803f-50e0af8eab35?api-version=2017-08-31" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "16ddc19c-e0e6-4669-86b8-3944cdf82a73" ], + "x-ms-request-id": [ "6b5bea16-393e-4b59-9150-42cacd9442a5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T101046Z:16ddc19c-e0e6-4669-86b8-3944cdf82a73" ], + "Date": [ "Fri, 31 Mar 2023 10:10:46 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "Invoke-AzAksAbortManagedClusterLatestOperation+[NoContext]+AbortViaIdentity+$POST+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks2/abort?api-version=2023-02-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks2/abort?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "99864c99-de49-4e0b-b3ae-942963294201" ], + "CommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation_AbortViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/12ef6be9-d5df-4e53-adb0-e5664e63ae28?api-version=2017-08-31" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T101047Z:63d8bbb0-8426-45ab-8931-656e5d58d40b" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "azure-asyncoperation": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/12ef6be9-d5df-4e53-adb0-e5664e63ae28?api-version=2017-08-31" ], + "x-ms-correlation-request-id": [ "63d8bbb0-8426-45ab-8931-656e5d58d40b" ], + "x-ms-request-id": [ "12ef6be9-d5df-4e53-adb0-e5664e63ae28" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "nginx" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Fri, 31 Mar 2023 10:10:47 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3345" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks2\",\n \"location\": \"eastus\",\n \"name\": \"aks2\",\n \"type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": \"1.24.9\",\n \"currentKubernetesVersion\": \"1.24.9\",\n \"dnsPrefix\": \"aks20b1f\",\n \"fqdn\": \"aks20b1f-x0kuwv60.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": \"aks20b1f-x0kuwv60.portal.hcp.eastus.azmk8s.io\",\n \"agentPoolProfiles\": [\n {\n \"name\": \"default\",\n \"count\": 3,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Updating\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKqmxYucPFYdhu0O/x3coL2G3XHy+o5XvGJUteWoquL2Bd1ZyAIKKR+Pgv+jK5N8GRnNKrvK6zWEzuQiIrgrVUIFy7JIv20MSk2NmxWERZpOCdVDNMKQq22Lcsz6iTX31ixEI6cFGOh5RrZq87oPrqIc/O1HqPWfgYO2Jjhfzec/pKaNXklw8k2cquk3ykvgvaln4KFGL6tMe8+osW1bQZDynlt/4uApg3k3VoCJTYypi4vsAqqN1Kgbx3pTTgfNA3EwLy3wnsT6p3gjeptOeWonh3MpBa4djXho14nPMhr32wvudHZWVLODwGEyiGTTY2RH793QZMTbvVLfTV1wi16KezfN+AzMRZzdCJ2HIwGaYq4A2QLZidnwouPp1M5uLaI+Cn+O3J0kFQfi4SkRS6llguMeDsu1MeXhCwJC+4ehlmxw3RNOaGXqvVK5o4ff3kNXKr8AMOEUd3az+2A8QCYoc5uNjPxEwl4ZU+gPF795RBtcLzlz4pmwY3CV4z6ik= fareast\\\\yanxu1@yanxu1\\r\\n\"\n }\n ]\n }\n },\n \"windowsProfile\": {\n \"adminUsername\": \"azureuser\",\n \"enableCSIProxy\": true\n },\n \"servicePrincipalProfile\": {\n \"clientId\": \"b6fe7f21-8eb3-4d62-acab-b089c80c11e9\"\n },\n \"addonProfiles\": {\n \"keda\": {\n \"enabled\": true,\n \"config\": {\n \"addonv2\": \"true\"\n }\n }\n },\n \"nodeResourceGroup\": \"MC_aks-test_aks2_eastus\",\n \"enableRBAC\": true,\n \"networkProfile\": {\n \"networkPlugin\": \"azure\",\n \"networkDataplane\": \"azure\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/MC_aks-test_aks2_eastus/providers/Microsoft.Network/publicIPAddresses/925dd52a-b4d0-40ad-99b0-b4c22877d0d8\"\n }\n ]\n },\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\": 100,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": false\n },\n \"workloadAutoScalerProfile\": {}\n },\n \"sku\": {\n \"name\": \"Base\",\n \"tier\": \"Free\"\n }\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksAbortManagedClusterLatestOperation+[NoContext]+AbortViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/12ef6be9-d5df-4e53-adb0-e5664e63ae28?api-version=2017-08-31+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/12ef6be9-d5df-4e53-adb0-e5664e63ae28?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "99864c99-de49-4e0b-b3ae-942963294201" ], + "CommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation_AbortViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "0f0dc4ca-2483-4ec9-900a-929302c6f1f0" ], + "x-ms-request-id": [ "2375b488-86e3-4352-9b7b-6e625264f91a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T101117Z:0f0dc4ca-2483-4ec9-900a-929302c6f1f0" ], + "Date": [ "Fri, 31 Mar 2023 10:11:17 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "170" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"e96bef12-dfd5-534e-adb0-e5664e63ae28\",\n \"status\": \"Succeeded\",\n \"startTime\": \"2023-03-31T10:10:47.2190425Z\",\n \"endTime\": \"2023-03-31T10:10:53.7539344Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksAbortManagedClusterLatestOperation+[NoContext]+AbortViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/12ef6be9-d5df-4e53-adb0-e5664e63ae28?api-version=2017-08-31+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/12ef6be9-d5df-4e53-adb0-e5664e63ae28?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "99864c99-de49-4e0b-b3ae-942963294201" ], + "CommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation" ], + "FullCommandName": [ "Invoke-AzAksAbortManagedClusterLatestOperation_AbortViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/12ef6be9-d5df-4e53-adb0-e5664e63ae28?api-version=2017-08-31" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "cf02459f-c918-4767-890d-94199dc7d0de" ], + "x-ms-request-id": [ "176734e5-df5b-48c8-b5a0-ba6283cd0bc4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T101118Z:cf02459f-c918-4767-890d-94199dc7d0de" ], + "Date": [ "Fri, 31 Mar 2023 10:11:17 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortManagedClusterLatestOperation.Tests.ps1 b/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortManagedClusterLatestOperation.Tests.ps1 new file mode 100644 index 000000000000..ee5155542d5b --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Invoke-AzAksAbortManagedClusterLatestOperation.Tests.ps1 @@ -0,0 +1,26 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzAksAbortManagedClusterLatestOperation')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzAksAbortManagedClusterLatestOperation.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzAksAbortManagedClusterLatestOperation' { + It 'Abort' { + Invoke-AzAksAbortManagedClusterLatestOperation -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName + } + + It 'AbortViaIdentity' { + $aks = @{Id = '/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks2'} + Invoke-AzAksAbortManagedClusterLatestOperation -InputObject $aks + } +} diff --git a/src/Aks/Aks.Autorest/test/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.Recording.json b/src/Aks/Aks.Autorest/test/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.Recording.json new file mode 100644 index 000000000000..a80339082026 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.Recording.json @@ -0,0 +1,498 @@ +{ + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+Rotate+$POST+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/rotateServiceAccountSigningKeys?api-version=2023-02-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/rotateServiceAccountSigningKeys?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "1" ], + "x-ms-client-request-id": [ "486d956d-15e7-40e3-b557-9328d8bca012" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_Rotate" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052007Z:f8cfe820-166c-4ac4-af59-36646a3e2ae4" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "azure-asyncoperation": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31" ], + "x-ms-correlation-request-id": [ "f8cfe820-166c-4ac4-af59-36646a3e2ae4" ], + "x-ms-request-id": [ "4ca1556f-fa3d-47a5-a9e4-38756f3c6280" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "nginx" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Tue, 04 Apr 2023 05:20:07 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3504" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks\",\n \"location\": \"eastus\",\n \"name\": \"aks\",\n \"type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": \"RotatingServiceAccountSigningKeysExternal\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": \"1.24.9\",\n \"currentKubernetesVersion\": \"1.24.9\",\n \"dnsPrefix\": \"aks0b1f\",\n \"fqdn\": \"aks0b1f-ki5u49io.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": \"aks0b1f-ki5u49io.portal.hcp.eastus.azmk8s.io\",\n \"agentPoolProfiles\": [\n {\n \"name\": \"default\",\n \"count\": 1,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKqmxYucPFYdhu0O/x3coL2G3XHy+o5XvGJUteWoquL2Bd1ZyAIKKR+Pgv+jK5N8GRnNKrvK6zWEzuQiIrgrVUIFy7JIv20MSk2NmxWERZpOCdVDNMKQq22Lcsz6iTX31ixEI6cFGOh5RrZq87oPrqIc/O1HqPWfgYO2Jjhfzec/pKaNXklw8k2cquk3ykvgvaln4KFGL6tMe8+osW1bQZDynlt/4uApg3k3VoCJTYypi4vsAqqN1Kgbx3pTTgfNA3EwLy3wnsT6p3gjeptOeWonh3MpBa4djXho14nPMhr32wvudHZWVLODwGEyiGTTY2RH793QZMTbvVLfTV1wi16KezfN+AzMRZzdCJ2HIwGaYq4A2QLZidnwouPp1M5uLaI+Cn+O3J0kFQfi4SkRS6llguMeDsu1MeXhCwJC+4ehlmxw3RNOaGXqvVK5o4ff3kNXKr8AMOEUd3az+2A8QCYoc5uNjPxEwl4ZU+gPF795RBtcLzlz4pmwY3CV4z6ik= fareast\\\\yanxu1@yanxu1\\r\\n\"\n }\n ]\n }\n },\n \"windowsProfile\": {\n \"adminUsername\": \"azureuser\",\n \"enableCSIProxy\": true\n },\n \"servicePrincipalProfile\": {\n \"clientId\": \"b6fe7f21-8eb3-4d62-acab-b089c80c11e9\"\n },\n \"addonProfiles\": {\n \"keda\": {\n \"enabled\": true,\n \"config\": {\n \"addonv2\": \"true\"\n }\n }\n },\n \"nodeResourceGroup\": \"MC_aks-test_aks_eastus\",\n \"enableRBAC\": true,\n \"networkProfile\": {\n \"networkPlugin\": \"azure\",\n \"networkDataplane\": \"azure\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/MC_aks-test_aks_eastus/providers/Microsoft.Network/publicIPAddresses/7e2d92db-1a6f-4b28-95eb-86050ca664f7\"\n }\n ]\n },\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\": 100,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": true,\n \"issuerURL\": \"https://eastus.oic.prod-aks.azure.com/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/57227a14-e3d5-4720-af7e-be09e379b74e/\"\n },\n \"workloadAutoScalerProfile\": {}\n },\n \"sku\": {\n \"name\": \"Base\",\n \"tier\": \"Free\"\n }\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+Rotate+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "486d956d-15e7-40e3-b557-9328d8bca012" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_Rotate" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "7da7255b-2421-4f1c-b53d-ec3b9c16df67" ], + "x-ms-request-id": [ "fbf722da-471c-44a3-8815-da964c9e97e7" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052038Z:7da7255b-2421-4f1c-b53d-ec3b9c16df67" ], + "Date": [ "Tue, 04 Apr 2023 05:20:37 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"6f55a14c-3dfa-a547-a9e4-38756f3c6280\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-04-04T05:20:07.3964396Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+Rotate+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "486d956d-15e7-40e3-b557-9328d8bca012" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_Rotate" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "50dfe7b7-c9f3-4e93-8817-3356e838d50e" ], + "x-ms-request-id": [ "0dea9e89-d15a-434f-b6f6-3f386a5396bf" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052108Z:50dfe7b7-c9f3-4e93-8817-3356e838d50e" ], + "Date": [ "Tue, 04 Apr 2023 05:21:08 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"6f55a14c-3dfa-a547-a9e4-38756f3c6280\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-04-04T05:20:07.3964396Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+Rotate+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "486d956d-15e7-40e3-b557-9328d8bca012" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_Rotate" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "e4ba79ab-65d1-461f-9443-d8fdc8110be4" ], + "x-ms-request-id": [ "51dfb1ea-1d1b-4262-8d44-5cfc1725b24a" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052141Z:e4ba79ab-65d1-461f-9443-d8fdc8110be4" ], + "Date": [ "Tue, 04 Apr 2023 05:21:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"6f55a14c-3dfa-a547-a9e4-38756f3c6280\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-04-04T05:20:07.3964396Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+Rotate+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "486d956d-15e7-40e3-b557-9328d8bca012" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_Rotate" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "6fea4ce4-61ab-44e6-89ad-a7286744b386" ], + "x-ms-request-id": [ "034b655e-9e0a-4a14-ae3b-31ae411405f1" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052211Z:6fea4ce4-61ab-44e6-89ad-a7286744b386" ], + "Date": [ "Tue, 04 Apr 2023 05:22:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "170" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"6f55a14c-3dfa-a547-a9e4-38756f3c6280\",\n \"status\": \"Succeeded\",\n \"startTime\": \"2023-04-04T05:20:07.3964396Z\",\n \"endTime\": \"2023-04-04T05:21:50.8087219Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+Rotate+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "486d956d-15e7-40e3-b557-9328d8bca012" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_Rotate" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/4ca1556f-fa3d-47a5-a9e4-38756f3c6280?api-version=2017-08-31" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], + "x-ms-correlation-request-id": [ "1ef868d5-bc51-4aa3-8335-58b88cae32f2" ], + "x-ms-request-id": [ "cabfc509-510b-4d79-9ec2-b7021f7ba75b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052212Z:1ef868d5-bc51-4aa3-8335-58b88cae32f2" ], + "Date": [ "Tue, 04 Apr 2023 05:22:12 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+RotateViaIdentity+$POST+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/rotateServiceAccountSigningKeys?api-version=2023-02-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/rotateServiceAccountSigningKeys?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "1c642503-b866-40d2-92ce-c4c639b20192" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052213Z:f63e697c-c6f1-40d0-996c-23d98a8b6b68" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "azure-asyncoperation": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31" ], + "x-ms-correlation-request-id": [ "f63e697c-c6f1-40d0-996c-23d98a8b6b68" ], + "x-ms-request-id": [ "a17edeef-ef75-44b0-bf92-261e00b1a83e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "nginx" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Tue, 04 Apr 2023 05:22:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "3504" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks\",\n \"location\": \"eastus\",\n \"name\": \"aks\",\n \"type\": \"Microsoft.ContainerService/ManagedClusters\",\n \"properties\": {\n \"provisioningState\": \"RotatingServiceAccountSigningKeysExternal\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"kubernetesVersion\": \"1.24.9\",\n \"currentKubernetesVersion\": \"1.24.9\",\n \"dnsPrefix\": \"aks0b1f\",\n \"fqdn\": \"aks0b1f-ki5u49io.hcp.eastus.azmk8s.io\",\n \"azurePortalFQDN\": \"aks0b1f-ki5u49io.portal.hcp.eastus.azmk8s.io\",\n \"agentPoolProfiles\": [\n {\n \"name\": \"default\",\n \"count\": 1,\n \"vmSize\": \"Standard_D2_v2\",\n \"osDiskSizeGB\": 128,\n \"osDiskType\": \"Managed\",\n \"kubeletDiskType\": \"OS\",\n \"maxPods\": 30,\n \"type\": \"VirtualMachineScaleSets\",\n \"provisioningState\": \"Succeeded\",\n \"powerState\": {\n \"code\": \"Running\"\n },\n \"orchestratorVersion\": \"1.24.9\",\n \"currentOrchestratorVersion\": \"1.24.9\",\n \"mode\": \"System\",\n \"osType\": \"Linux\",\n \"osSKU\": \"Ubuntu\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"enableFIPS\": false\n }\n ],\n \"linuxProfile\": {\n \"adminUsername\": \"azureuser\",\n \"ssh\": {\n \"publicKeys\": [\n {\n \"keyData\": \"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDKqmxYucPFYdhu0O/x3coL2G3XHy+o5XvGJUteWoquL2Bd1ZyAIKKR+Pgv+jK5N8GRnNKrvK6zWEzuQiIrgrVUIFy7JIv20MSk2NmxWERZpOCdVDNMKQq22Lcsz6iTX31ixEI6cFGOh5RrZq87oPrqIc/O1HqPWfgYO2Jjhfzec/pKaNXklw8k2cquk3ykvgvaln4KFGL6tMe8+osW1bQZDynlt/4uApg3k3VoCJTYypi4vsAqqN1Kgbx3pTTgfNA3EwLy3wnsT6p3gjeptOeWonh3MpBa4djXho14nPMhr32wvudHZWVLODwGEyiGTTY2RH793QZMTbvVLfTV1wi16KezfN+AzMRZzdCJ2HIwGaYq4A2QLZidnwouPp1M5uLaI+Cn+O3J0kFQfi4SkRS6llguMeDsu1MeXhCwJC+4ehlmxw3RNOaGXqvVK5o4ff3kNXKr8AMOEUd3az+2A8QCYoc5uNjPxEwl4ZU+gPF795RBtcLzlz4pmwY3CV4z6ik= fareast\\\\yanxu1@yanxu1\\r\\n\"\n }\n ]\n }\n },\n \"windowsProfile\": {\n \"adminUsername\": \"azureuser\",\n \"enableCSIProxy\": true\n },\n \"servicePrincipalProfile\": {\n \"clientId\": \"b6fe7f21-8eb3-4d62-acab-b089c80c11e9\"\n },\n \"addonProfiles\": {\n \"keda\": {\n \"enabled\": true,\n \"config\": {\n \"addonv2\": \"true\"\n }\n }\n },\n \"nodeResourceGroup\": \"MC_aks-test_aks_eastus\",\n \"enableRBAC\": true,\n \"networkProfile\": {\n \"networkPlugin\": \"azure\",\n \"networkDataplane\": \"azure\",\n \"loadBalancerSku\": \"Standard\",\n \"loadBalancerProfile\": {\n \"managedOutboundIPs\": {\n \"count\": 1\n },\n \"effectiveOutboundIPs\": [\n {\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/MC_aks-test_aks_eastus/providers/Microsoft.Network/publicIPAddresses/7e2d92db-1a6f-4b28-95eb-86050ca664f7\"\n }\n ]\n },\n \"serviceCidr\": \"10.0.0.0/16\",\n \"dnsServiceIP\": \"10.0.0.10\",\n \"dockerBridgeCidr\": \"172.17.0.1/16\",\n \"outboundType\": \"loadBalancer\",\n \"serviceCidrs\": [\n \"10.0.0.0/16\"\n ],\n \"ipFamilies\": [\n \"IPv4\"\n ]\n },\n \"maxAgentPools\": 100,\n \"securityProfile\": {},\n \"storageProfile\": {\n \"diskCSIDriver\": {\n \"enabled\": true\n },\n \"fileCSIDriver\": {\n \"enabled\": true\n },\n \"snapshotController\": {\n \"enabled\": true\n }\n },\n \"oidcIssuerProfile\": {\n \"enabled\": true,\n \"issuerURL\": \"https://eastus.oic.prod-aks.azure.com/54826b22-38d6-4fb2-bad9-b7b93a3e9c5a/57227a14-e3d5-4720-af7e-be09e379b74e/\"\n },\n \"workloadAutoScalerProfile\": {}\n },\n \"sku\": {\n \"name\": \"Base\",\n \"tier\": \"Free\"\n }\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+RotateViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "1c642503-b866-40d2-92ce-c4c639b20192" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], + "x-ms-correlation-request-id": [ "d081f8a2-6cd6-432e-8471-da2ff8dba43d" ], + "x-ms-request-id": [ "6fc407bb-b94c-4916-918b-f6efe590fc8e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052244Z:d081f8a2-6cd6-432e-8471-da2ff8dba43d" ], + "Date": [ "Tue, 04 Apr 2023 05:22:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"efde7ea1-75ef-b044-bf92-261e00b1a83e\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-04-04T05:22:13.3363868Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+RotateViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "1c642503-b866-40d2-92ce-c4c639b20192" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], + "x-ms-correlation-request-id": [ "23fefafe-1a29-422b-aa20-ed042530c647" ], + "x-ms-request-id": [ "b062978e-82d4-4cd9-ae75-1f7521bcfbab" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052314Z:23fefafe-1a29-422b-aa20-ed042530c647" ], + "Date": [ "Tue, 04 Apr 2023 05:23:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"efde7ea1-75ef-b044-bf92-261e00b1a83e\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-04-04T05:22:13.3363868Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+RotateViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31+4": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "1c642503-b866-40d2-92ce-c4c639b20192" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], + "x-ms-correlation-request-id": [ "6376d616-19f4-4b25-a201-ea24d8528425" ], + "x-ms-request-id": [ "b13d5324-064e-4283-9585-25d793d70f85" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052344Z:6376d616-19f4-4b25-a201-ea24d8528425" ], + "Date": [ "Tue, 04 Apr 2023 05:23:44 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"efde7ea1-75ef-b044-bf92-261e00b1a83e\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-04-04T05:22:13.3363868Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+RotateViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31+5": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "1c642503-b866-40d2-92ce-c4c639b20192" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], + "x-ms-correlation-request-id": [ "86bc05db-481f-4ab9-ba89-7715eea2902a" ], + "x-ms-request-id": [ "b3ac366a-922c-4c19-b393-9474b6180af5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052415Z:86bc05db-481f-4ab9-ba89-7715eea2902a" ], + "Date": [ "Tue, 04 Apr 2023 05:24:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "170" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"efde7ea1-75ef-b044-bf92-261e00b1a83e\",\n \"status\": \"Succeeded\",\n \"startTime\": \"2023-04-04T05:22:13.3363868Z\",\n \"endTime\": \"2023-04-04T05:23:53.6298685Z\"\n }", + "isContentBase64": false + } + }, + "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey+[NoContext]+RotateViaIdentity+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31+6": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "1c642503-b866-40d2-92ce-c4c639b20192" ], + "CommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey" ], + "FullCommandName": [ "Invoke-AzAksRotateManagedClusterServiceAccountSigningKey_RotateViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 204, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/a17edeef-ef75-44b0-bf92-261e00b1a83e?api-version=2017-08-31" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], + "x-ms-correlation-request-id": [ "a55a5d63-2db1-455c-83c4-69662106e9a1" ], + "x-ms-request-id": [ "d7490c51-7a28-4ecf-a0d4-919d40ae8a11" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230404T052415Z:a55a5d63-2db1-455c-83c4-69662106e9a1" ], + "Date": [ "Tue, 04 Apr 2023 05:24:15 GMT" ] + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.Tests.ps1 b/src/Aks/Aks.Autorest/test/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.Tests.ps1 new file mode 100644 index 000000000000..bc91bf014d97 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.Tests.ps1 @@ -0,0 +1,26 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Invoke-AzAksRotateManagedClusterServiceAccountSigningKey')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Invoke-AzAksRotateManagedClusterServiceAccountSigningKey' { + It 'Rotate' { + Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName + } + + It 'RotateViaIdentity' { + $aks = @{Id="/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks"} + Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -InputObject $aks + } +} diff --git a/src/Aks/Aks.Autorest/test/New-AzAksMaintenanceConfiguration.Recording.json b/src/Aks/Aks.Autorest/test/New-AzAksMaintenanceConfiguration.Recording.json new file mode 100644 index 000000000000..381b67d3aa3d --- /dev/null +++ b/src/Aks/Aks.Autorest/test/New-AzAksMaintenanceConfiguration.Recording.json @@ -0,0 +1,78 @@ +{ + "New-AzAksMaintenanceConfiguration+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"timeInWeek\": [\r\n {\r\n \"day\": \"Sunday\",\r\n \"hourSlots\": [ 1, 2 ]\r\n }\r\n ],\r\n \"notAllowedTime\": [\r\n {\r\n \"start\": \"2023-03-01T17:07:57.6433865+08:00\",\r\n \"end\": \"2023-03-02T17:07:57.6436323+08:00\"\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "289" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "79524363-4780-431e-8552-086f0fe58189" ], + "x-ms-request-id": [ "4bbec507-2685-4953-ab89-aa524290e446" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T090759Z:79524363-4780-431e-8552-086f0fe58189" ], + "Date": [ "Thu, 30 Mar 2023 09:07:58 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "487" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config\",\n \"name\": \"aks_maintenance_config\",\n \"properties\": {\n \"timeInWeek\": [\n {\n \"day\": \"Sunday\",\n \"hourSlots\": [\n 1,\n 2\n ]\n }\n ],\n \"notAllowedTime\": [\n {\n \"start\": \"2023-03-01T09:07:57.6433865Z\",\n \"end\": \"2023-03-02T09:07:57.6436323Z\"\n }\n ]\n }\n }", + "isContentBase64": false + } + }, + "New-AzAksMaintenanceConfiguration+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "80d4a0a8-0c88-4084-8f1f-2e90991943a5" ], + "CommandName": [ "Remove-AzAksMaintenanceConfiguration" ], + "FullCommandName": [ "Remove-AzAksMaintenanceConfiguration_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "b1cbdec1-6394-4432-af07-960eff275344" ], + "x-ms-request-id": [ "5261a3ea-e27d-4a6d-bfa8-67afe9ce2bec" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T090759Z:b1cbdec1-6394-4432-af07-960eff275344" ], + "Date": [ "Thu, 30 Mar 2023 09:07:59 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/New-AzAksMaintenanceConfiguration.Tests.ps1 b/src/Aks/Aks.Autorest/test/New-AzAksMaintenanceConfiguration.Tests.ps1 new file mode 100644 index 000000000000..5ee95d8a5c5d --- /dev/null +++ b/src/Aks/Aks.Autorest/test/New-AzAksMaintenanceConfiguration.Tests.ps1 @@ -0,0 +1,34 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzAksMaintenanceConfiguration')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzAksMaintenanceConfiguration.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzAksMaintenanceConfiguration' { + It 'CreateExpanded' { + $MaintenanceConfigName = 'aks_maintenance_config' + $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 $env.ResourceGroupName -ResourceName $env.AksName -ConfigName $MaintenanceConfigName -TimeInWeek $TimeInWeek -NotAllowedTime $TimeSpan + + $MaintenanceConfig.Name | Should -Be $MaintenanceConfigName + $MaintenanceConfig.NotAllowedTime.Start.ToShortDateString() | Should -Be '3/1/2023' + $MaintenanceConfig.NotAllowedTime.End.ToShortDateString() | Should -Be '3/2/2023' + $MaintenanceConfig.TimeInWeek.Day | Should -Be 'Sunday' + $MaintenanceConfig.TimeInWeek.HourSlot.Count | Should -Be 2 + $MaintenanceConfig.TimeInWeek.HourSlot.Contains(1) | Should -Be $true + $MaintenanceConfig.TimeInWeek.HourSlot.Contains(2) | Should -Be $true + + Remove-AzAksMaintenanceConfiguration -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName -ConfigName $MaintenanceConfigName + } +} diff --git a/src/Aks/Aks.Autorest/test/New-AzAksSnapshot.Recording.json b/src/Aks/Aks.Autorest/test/New-AzAksSnapshot.Recording.json new file mode 100644 index 000000000000..e26618bdd2a3 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/New-AzAksSnapshot.Recording.json @@ -0,0 +1,78 @@ +{ + "New-AzAksSnapshot+[NoContext]+CreateExpanded+$PUT+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01", + "Content": "{\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"creationData\": {\r\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\r\n },\r\n \"snapshotType\": \"NodePool\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "297" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "1409c36d-378e-47c2-a245-d36099e385ed" ], + "x-ms-request-id": [ "46f950e1-6c58-447a-9f00-eab320691067" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T102445Z:1409c36d-378e-47c2-a245-d36099e385ed" ], + "Date": [ "Thu, 30 Mar 2023 10:24:45 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "943" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"snapshot1\",\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1\",\n \"type\": \"Microsoft.ContainerService/Snapshots\",\n \"location\": \"eastus\",\n \"systemData\": {\n \"createdBy\": \"yanxu1@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\": \"2023-03-30T10:24:43.8567842Z\",\n \"lastModifiedBy\": \"yanxu1@microsoft.com\",\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2023-03-30T10:24:43.8567842Z\"\n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\n },\n \"snapshotType\": \"NodePool\",\n \"kubernetesVersion\": \"1.24.9\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"osType\": \"Linux\",\n \"osSku\": \"Ubuntu\",\n \"vmSize\": \"Standard_D2_v2\"\n }\n }", + "isContentBase64": false + } + }, + "New-AzAksSnapshot+[NoContext]+CreateExpanded+$DELETE+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "09df5ad6-0250-414e-a2d0-b83c26623fd1" ], + "CommandName": [ "Remove-AzAksSnapshot" ], + "FullCommandName": [ "Remove-AzAksSnapshot_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "8449e913-451f-4c56-bf3f-45f3eb71b6ea" ], + "x-ms-request-id": [ "342c2f9c-ab67-416d-b6e2-146997d84cf5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T102448Z:8449e913-451f-4c56-bf3f-45f3eb71b6ea" ], + "Date": [ "Thu, 30 Mar 2023 10:24:47 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/New-AzAksSnapshot.Tests.ps1 b/src/Aks/Aks.Autorest/test/New-AzAksSnapshot.Tests.ps1 new file mode 100644 index 000000000000..3cac3cc7f648 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/New-AzAksSnapshot.Tests.ps1 @@ -0,0 +1,36 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzAksSnapshot')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzAksSnapshot.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzAksSnapshot' { + It 'CreateExpanded' { + $nodepoolId = "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default" + $Snapshot = New-AzAksSnapshot -ResourceGroupName $env.ResourceGroupName -ResourceName 'snapshot1' -Location $env.location -SnapshotType 'NodePool' -CreationDataSourceResourceId $nodepoolId + + $Snapshot.CreationDataSourceResourceId | Should -Be $nodepoolId + $Snapshot.KubernetesVersion | Should -Be '1.24.9' + $Snapshot.Location | Should -Be $env.location + $Snapshot.Name | Should -Be 'snapshot1' + $Snapshot.NodeImageVersion | Should -Be 'AKSUbuntu-1804containerd-202303.13.0' + $Snapshot.OSSku | Should -Be 'Ubuntu' + $Snapshot.OSType | Should -Be 'Linux' + $Snapshot.SnapshotType | Should -Be 'NodePool' + $Snapshot.SystemDataCreatedByType | Should -Be 'User' + $Snapshot.SystemDataLastModifiedByType | Should -Be 'User' + $Snapshot.VMSize | Should -Be 'Standard_D2_v2' + + Remove-AzAksSnapshot -InputObject $Snapshot + } +} diff --git a/src/Aks/Aks.Autorest/test/New-AzAksTimeInWeekObject.Tests.ps1 b/src/Aks/Aks.Autorest/test/New-AzAksTimeInWeekObject.Tests.ps1 new file mode 100644 index 000000000000..47ced640b83a --- /dev/null +++ b/src/Aks/Aks.Autorest/test/New-AzAksTimeInWeekObject.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzAksTimeInWeekObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzAksTimeInWeekObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzAksTimeInWeekObject' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Aks/Aks.Autorest/test/New-AzAksTimeSpanObject.Tests.ps1 b/src/Aks/Aks.Autorest/test/New-AzAksTimeSpanObject.Tests.ps1 new file mode 100644 index 000000000000..8e866004a176 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/New-AzAksTimeSpanObject.Tests.ps1 @@ -0,0 +1,21 @@ +if(($null -eq $TestName) -or ($TestName -contains 'New-AzAksTimeSpanObject')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'New-AzAksTimeSpanObject.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'New-AzAksTimeSpanObject' { + It '__AllParameterSets' -skip { + { throw [System.NotImplementedException] } | Should -Not -Throw + } +} diff --git a/src/Aks/Aks.Autorest/test/Remove-AzAksMaintenanceConfiguration.Recording.json b/src/Aks/Aks.Autorest/test/Remove-AzAksMaintenanceConfiguration.Recording.json new file mode 100644 index 000000000000..2cba62b3a7b5 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Remove-AzAksMaintenanceConfiguration.Recording.json @@ -0,0 +1,154 @@ +{ + "Remove-AzAksMaintenanceConfiguration+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"timeInWeek\": [\r\n {\r\n \"day\": \"Sunday\",\r\n \"hourSlots\": [ 1, 2 ]\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "131" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "6c52976f-50fa-46ee-adf9-e6135999a42d" ], + "x-ms-request-id": [ "5bad1ca7-3fe5-436a-b416-68e548fff03b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T094326Z:6c52976f-50fa-46ee-adf9-e6135999a42d" ], + "Date": [ "Thu, 30 Mar 2023 09:43:26 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "357" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config\",\n \"name\": \"aks_maintenance_config\",\n \"properties\": {\n \"timeInWeek\": [\n {\n \"day\": \"Sunday\",\n \"hourSlots\": [\n 1,\n 2\n ]\n }\n ]\n }\n }", + "isContentBase64": false + } + }, + "Remove-AzAksMaintenanceConfiguration+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "c2509cf8-e65c-471f-ad7d-d3611a0643ab" ], + "CommandName": [ "Remove-AzAksMaintenanceConfiguration" ], + "FullCommandName": [ "Remove-AzAksMaintenanceConfiguration_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "e7d1ad7b-471f-4334-ac81-56edd77656b2" ], + "x-ms-request-id": [ "9ec620f2-f159-417b-b498-d38f02556c59" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T094327Z:e7d1ad7b-471f-4334-ac81-56edd77656b2" ], + "Date": [ "Thu, 30 Mar 2023 09:43:26 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "Remove-AzAksMaintenanceConfiguration+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01", + "Content": "{\r\n \"properties\": {\r\n \"timeInWeek\": [\r\n {\r\n \"day\": \"Sunday\",\r\n \"hourSlots\": [ 1, 2 ]\r\n }\r\n ]\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "131" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1197" ], + "x-ms-correlation-request-id": [ "710e1ecb-edd3-42c4-a4c3-16db8821f98e" ], + "x-ms-request-id": [ "2ff64d57-f991-4d3d-a5f7-19827de3bf4b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T094328Z:710e1ecb-edd3-42c4-a4c3-16db8821f98e" ], + "Date": [ "Thu, 30 Mar 2023 09:43:27 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "357" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config\",\n \"name\": \"aks_maintenance_config\",\n \"properties\": {\n \"timeInWeek\": [\n {\n \"day\": \"Sunday\",\n \"hourSlots\": [\n 1,\n 2\n ]\n }\n ]\n }\n }", + "isContentBase64": false + } + }, + "Remove-AzAksMaintenanceConfiguration+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/maintenanceConfigurations/aks_maintenance_config?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "67c1c290-bf8d-4119-afe7-cd90fd8d6059" ], + "CommandName": [ "Remove-AzAksMaintenanceConfiguration" ], + "FullCommandName": [ "Remove-AzAksMaintenanceConfiguration_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-correlation-request-id": [ "f8182adb-6c32-4186-aa86-31493caf5e5e" ], + "x-ms-request-id": [ "2d91c3f8-0b7c-499f-9e96-3654e333f2c3" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T094329Z:f8182adb-6c32-4186-aa86-31493caf5e5e" ], + "Date": [ "Thu, 30 Mar 2023 09:43:28 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Remove-AzAksMaintenanceConfiguration.Tests.ps1 b/src/Aks/Aks.Autorest/test/Remove-AzAksMaintenanceConfiguration.Tests.ps1 new file mode 100644 index 000000000000..5d7e617a7982 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Remove-AzAksMaintenanceConfiguration.Tests.ps1 @@ -0,0 +1,31 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzAksMaintenanceConfiguration')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzAksMaintenanceConfiguration.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzAksMaintenanceConfiguration' { + It 'Delete' { + $MaintenanceConfigName = 'aks_maintenance_config' + $TimeInWeek = New-AzAksTimeInWeekObject -Day 'Sunday' -HourSlot 1,2 + $MaintenanceConfig = New-AzAksMaintenanceConfiguration -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName -ConfigName $MaintenanceConfigName -TimeInWeek $TimeInWeek + Remove-AzAksMaintenanceConfiguration -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName -ConfigName $MaintenanceConfigName + } + + It 'DeleteViaIdentity' { + $MaintenanceConfigName = 'aks_maintenance_config' + $TimeInWeek = New-AzAksTimeInWeekObject -Day 'Sunday' -HourSlot 1,2 + $MaintenanceConfig = New-AzAksMaintenanceConfiguration -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName -ConfigName $MaintenanceConfigName -TimeInWeek $TimeInWeek + Remove-AzAksMaintenanceConfiguration -InputObject $MaintenanceConfig + } +} diff --git a/src/Aks/Aks.Autorest/test/Remove-AzAksSnapshot.Recording.json b/src/Aks/Aks.Autorest/test/Remove-AzAksSnapshot.Recording.json new file mode 100644 index 000000000000..691df0ff3d7e --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Remove-AzAksSnapshot.Recording.json @@ -0,0 +1,154 @@ +{ + "Remove-AzAksSnapshot+[NoContext]+Delete+$PUT+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01", + "Content": "{\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"creationData\": {\r\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\r\n },\r\n \"snapshotType\": \"NodePool\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "297" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "0acfef94-563c-420a-b7bc-a66c8133ce85" ], + "x-ms-request-id": [ "cb0685cd-5c9e-43db-8ba9-4efe27bbcd6c" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T102343Z:0acfef94-563c-420a-b7bc-a66c8133ce85" ], + "Date": [ "Thu, 30 Mar 2023 10:23:43 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "943" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"snapshot1\",\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1\",\n \"type\": \"Microsoft.ContainerService/Snapshots\",\n \"location\": \"eastus\",\n \"systemData\": {\n \"createdBy\": \"yanxu1@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\": \"2023-03-30T10:23:41.5792026Z\",\n \"lastModifiedBy\": \"yanxu1@microsoft.com\",\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2023-03-30T10:23:41.5792026Z\"\n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\n },\n \"snapshotType\": \"NodePool\",\n \"kubernetesVersion\": \"1.24.9\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"osType\": \"Linux\",\n \"osSku\": \"Ubuntu\",\n \"vmSize\": \"Standard_D2_v2\"\n }\n }", + "isContentBase64": false + } + }, + "Remove-AzAksSnapshot+[NoContext]+Delete+$DELETE+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "e4a34231-d896-4ea9-af35-b047e08e4e0d" ], + "CommandName": [ "Remove-AzAksSnapshot" ], + "FullCommandName": [ "Remove-AzAksSnapshot_Delete" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14999" ], + "x-ms-correlation-request-id": [ "397c5910-928f-49c3-b1d8-5bbf2c99664c" ], + "x-ms-request-id": [ "1e681038-f664-4fb8-a075-0284fe5f5085" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T102345Z:397c5910-928f-49c3-b1d8-5bbf2c99664c" ], + "Date": [ "Thu, 30 Mar 2023 10:23:45 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "Remove-AzAksSnapshot+[NoContext]+DeleteViaIdentity+$PUT+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01+1": { + "Request": { + "Method": "PUT", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01", + "Content": "{\r\n \"location\": \"eastus\",\r\n \"properties\": {\r\n \"creationData\": {\r\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\r\n },\r\n \"snapshotType\": \"NodePool\"\r\n }\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "297" ] + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "bdd11cb4-4156-410b-bd4c-cbbad2902567" ], + "x-ms-request-id": [ "a76ddea0-7983-4994-9f52-71475e2bbe9f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T102348Z:bdd11cb4-4156-410b-bd4c-cbbad2902567" ], + "Date": [ "Thu, 30 Mar 2023 10:23:48 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "943" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"snapshot1\",\n \"id\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1\",\n \"type\": \"Microsoft.ContainerService/Snapshots\",\n \"location\": \"eastus\",\n \"systemData\": {\n \"createdBy\": \"yanxu1@microsoft.com\",\n \"createdByType\": \"User\",\n \"createdAt\": \"2023-03-30T10:23:47.5323339Z\",\n \"lastModifiedBy\": \"yanxu1@microsoft.com\",\n \"lastModifiedByType\": \"User\",\n \"lastModifiedAt\": \"2023-03-30T10:23:47.5323339Z\"\n },\n \"properties\": {\n \"creationData\": {\n \"sourceResourceId\": \"/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default\"\n },\n \"snapshotType\": \"NodePool\",\n \"kubernetesVersion\": \"1.24.9\",\n \"nodeImageVersion\": \"AKSUbuntu-1804containerd-202303.13.0\",\n \"osType\": \"Linux\",\n \"osSku\": \"Ubuntu\",\n \"vmSize\": \"Standard_D2_v2\"\n }\n }", + "isContentBase64": false + } + }, + "Remove-AzAksSnapshot+[NoContext]+DeleteViaIdentity+$DELETE+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01+2": { + "Request": { + "Method": "DELETE", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/snapshots/snapshot1?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "7cd3c09a-5830-4448-a4b6-de6621b16fc4" ], + "CommandName": [ "Remove-AzAksSnapshot" ], + "FullCommandName": [ "Remove-AzAksSnapshot_DeleteViaIdentity" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], + "Authorization": [ "[Filtered]" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-deletes": [ "14998" ], + "x-ms-correlation-request-id": [ "b414b9c8-cb24-4724-913e-150869550453" ], + "x-ms-request-id": [ "05a8667e-2d46-4281-bfa0-e1ac4af92aed" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230330T102351Z:b414b9c8-cb24-4724-913e-150869550453" ], + "Date": [ "Thu, 30 Mar 2023 10:23:51 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Remove-AzAksSnapshot.Tests.ps1 b/src/Aks/Aks.Autorest/test/Remove-AzAksSnapshot.Tests.ps1 new file mode 100644 index 000000000000..6fc5cb28844c --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Remove-AzAksSnapshot.Tests.ps1 @@ -0,0 +1,29 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Remove-AzAksSnapshot')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Remove-AzAksSnapshot.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Remove-AzAksSnapshot' { + It 'Delete' { + $nodepoolId = "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default" + $Snapshot = New-AzAksSnapshot -ResourceGroupName $env.ResourceGroupName -ResourceName 'snapshot1' -Location $env.location -SnapshotType 'NodePool' -CreationDataSourceResourceId $nodepoolId + Remove-AzAksSnapshot -ResourceGroupName $env.ResourceGroupName -ResourceName 'snapshot1' + } + + It 'DeleteViaIdentity' { + $nodepoolId = "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/agentPools/default" + $Snapshot = New-AzAksSnapshot -ResourceGroupName $env.ResourceGroupName -ResourceName 'snapshot1' -Location $env.location -SnapshotType 'NodePool' -CreationDataSourceResourceId $nodepoolId + Remove-AzAksSnapshot -InputObject $Snapshot + } +} diff --git a/src/Aks/Aks.Autorest/test/Start-AzAksCluster.Recording.json b/src/Aks/Aks.Autorest/test/Start-AzAksCluster.Recording.json index 45c390f47a05..d4f0391d4f82 100644 --- a/src/Aks/Aks.Autorest/test/Start-AzAksCluster.Recording.json +++ b/src/Aks/Aks.Autorest/test/Start-AzAksCluster.Recording.json @@ -1,17 +1,17 @@ { - "Start-AzAksCluster+[NoContext]+Start+$POST+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/start?api-version=2020-09-01+1": { + "Start-AzAksCluster+[NoContext]+Start+$POST+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/start?api-version=2023-02-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/start?api-version=2020-09-01", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/start?api-version=2023-02-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "3" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "4" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,16 +22,16 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operationresults/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31" ], - "x-ms-correlation-request-id": [ "7cb14ed1-b7b9-44b2-8e74-0331b57f03ee" ], - "x-ms-request-id": [ "1646b35b-ea77-4b7d-b29a-872d687483f1" ], + "azure-asyncoperation": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31" ], + "x-ms-correlation-request-id": [ "fc571538-5ef2-422e-8de9-a97ac875b489" ], + "x-ms-request-id": [ "9721e3a9-03d4-4292-9d07-8beb933ffbd8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T064944Z:7cb14ed1-b7b9-44b2-8e74-0331b57f03ee" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083505Z:fc571538-5ef2-422e-8de9-a97ac875b489" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 07 Jul 2021 06:49:44 GMT" ] + "Date": [ "Wed, 29 Mar 2023 08:35:04 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -41,20 +41,20 @@ "isContentBase64": false } }, - "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31+2": { + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "4" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -64,38 +64,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], - "x-ms-correlation-request-id": [ "28dbf101-de7e-4f92-b0af-12227ea604a0" ], - "x-ms-request-id": [ "6e3a70f2-dd11-405b-8997-f624b0df1f30" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], + "x-ms-correlation-request-id": [ "e7be978a-96e6-4685-b362-895911476279" ], + "x-ms-request-id": [ "8b0a5ea4-bca4-4195-8e31-4116a9fb36a3" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065015Z:28dbf101-de7e-4f92-b0af-12227ea604a0" ], - "Date": [ "Wed, 07 Jul 2021 06:50:14 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083535Z:e7be978a-96e6-4685-b362-895911476279" ], + "Date": [ "Wed, 29 Mar 2023 08:35:34 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "121" ], + "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"5bb34616-77ea-7d4b-b29a-872d687483f1\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:49:44.64Z\"\n }", + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", "isContentBase64": false } }, - "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31+3": { + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "5" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -105,38 +105,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], - "x-ms-correlation-request-id": [ "1ad9b9a1-f0c0-413d-9ea5-124f6df16c16" ], - "x-ms-request-id": [ "60fe2e92-3ed6-40c4-84f3-9eaed693bb73" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], + "x-ms-correlation-request-id": [ "4c8499d4-e48e-4639-a278-9853b43bfb98" ], + "x-ms-request-id": [ "d659b300-59c6-49da-81ae-9b0997f31adc" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065045Z:1ad9b9a1-f0c0-413d-9ea5-124f6df16c16" ], - "Date": [ "Wed, 07 Jul 2021 06:50:44 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083606Z:4c8499d4-e48e-4639-a278-9853b43bfb98" ], + "Date": [ "Wed, 29 Mar 2023 08:36:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "121" ], + "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"5bb34616-77ea-7d4b-b29a-872d687483f1\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:49:44.64Z\"\n }", + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", "isContentBase64": false } }, - "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31+4": { + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "6" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "7" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -146,38 +146,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11995" ], - "x-ms-correlation-request-id": [ "d606c602-3d9b-403b-8a83-e3bbffc0772c" ], - "x-ms-request-id": [ "5a7487b8-1351-472b-a2dd-5e791678e807" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], + "x-ms-correlation-request-id": [ "47a69173-bc06-4dd3-8e22-cf2e78234f33" ], + "x-ms-request-id": [ "c6e10900-508f-477c-a973-fc8e75f406d8" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065116Z:d606c602-3d9b-403b-8a83-e3bbffc0772c" ], - "Date": [ "Wed, 07 Jul 2021 06:51:15 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083636Z:47a69173-bc06-4dd3-8e22-cf2e78234f33" ], + "Date": [ "Wed, 29 Mar 2023 08:36:35 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "121" ], + "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"5bb34616-77ea-7d4b-b29a-872d687483f1\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:49:44.64Z\"\n }", + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", "isContentBase64": false } }, - "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31+5": { + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "7" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "8" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -187,38 +187,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11994" ], - "x-ms-correlation-request-id": [ "f0aa048f-c1e9-4d80-b1d3-7705565c89bd" ], - "x-ms-request-id": [ "3c772301-0112-4777-8c82-5452d18e7463" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11983" ], + "x-ms-correlation-request-id": [ "d2dd1971-04f1-4548-8249-f226d2f35360" ], + "x-ms-request-id": [ "1b1c02cc-c352-4801-a51d-36cceebd5893" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065146Z:f0aa048f-c1e9-4d80-b1d3-7705565c89bd" ], - "Date": [ "Wed, 07 Jul 2021 06:51:46 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083706Z:d2dd1971-04f1-4548-8249-f226d2f35360" ], + "Date": [ "Wed, 29 Mar 2023 08:37:05 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "121" ], + "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"5bb34616-77ea-7d4b-b29a-872d687483f1\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:49:44.64Z\"\n }", + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", "isContentBase64": false } }, - "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31+6": { + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+6": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "8" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "9" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -228,38 +228,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11993" ], - "x-ms-correlation-request-id": [ "1714642d-75fe-4e99-85fc-40505a1ae7bc" ], - "x-ms-request-id": [ "f2da902f-cb4d-4224-8418-e700fa593e3a" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11982" ], + "x-ms-correlation-request-id": [ "d3de34ea-dca3-4413-9681-bf670bbe015a" ], + "x-ms-request-id": [ "948aa745-0fb4-4900-a080-bb0689fe2981" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065216Z:1714642d-75fe-4e99-85fc-40505a1ae7bc" ], - "Date": [ "Wed, 07 Jul 2021 06:52:16 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083737Z:d3de34ea-dca3-4413-9681-bf670bbe015a" ], + "Date": [ "Wed, 29 Mar 2023 08:37:36 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "121" ], + "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"5bb34616-77ea-7d4b-b29a-872d687483f1\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:49:44.64Z\"\n }", + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", "isContentBase64": false } }, - "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31+7": { + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+7": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "9" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "10" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -269,38 +269,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11992" ], - "x-ms-correlation-request-id": [ "45726c3d-87fb-4e18-a552-38069fbf448f" ], - "x-ms-request-id": [ "95fb83c3-8131-4a7c-a058-60fe44ceb0bb" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11981" ], + "x-ms-correlation-request-id": [ "ed4dcfaf-fdb2-41f1-b24b-770651900268" ], + "x-ms-request-id": [ "98c2f0b6-9c68-48f4-b31c-62fdcb141e98" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065247Z:45726c3d-87fb-4e18-a552-38069fbf448f" ], - "Date": [ "Wed, 07 Jul 2021 06:52:46 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083807Z:ed4dcfaf-fdb2-41f1-b24b-770651900268" ], + "Date": [ "Wed, 29 Mar 2023 08:38:06 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "121" ], + "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"5bb34616-77ea-7d4b-b29a-872d687483f1\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:49:44.64Z\"\n }", + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", "isContentBase64": false } }, - "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31+8": { + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+8": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "10" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "11" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -310,38 +310,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11991" ], - "x-ms-correlation-request-id": [ "b176065b-a8d6-4e0c-b8df-77ea680278ee" ], - "x-ms-request-id": [ "979769f6-8f48-41b2-8c6c-138f12370a00" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11980" ], + "x-ms-correlation-request-id": [ "911beaf0-a932-4aca-b516-c9b5508fafce" ], + "x-ms-request-id": [ "a87255e2-1594-4a0e-b8ba-b5056bf6f92f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065317Z:b176065b-a8d6-4e0c-b8df-77ea680278ee" ], - "Date": [ "Wed, 07 Jul 2021 06:53:17 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083838Z:911beaf0-a932-4aca-b516-c9b5508fafce" ], + "Date": [ "Wed, 29 Mar 2023 08:38:37 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "121" ], + "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"5bb34616-77ea-7d4b-b29a-872d687483f1\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:49:44.64Z\"\n }", + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", "isContentBase64": false } }, - "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31+9": { + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+9": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "11" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "12" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -351,38 +351,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11990" ], - "x-ms-correlation-request-id": [ "46c32fba-bfe5-4751-b2a3-eecc71f789b3" ], - "x-ms-request-id": [ "d593ad52-76f7-4f44-952d-ea282fec3785" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11979" ], + "x-ms-correlation-request-id": [ "bea24cd1-b43f-434a-a800-f84a2d4ce869" ], + "x-ms-request-id": [ "4b4ae36c-87ad-4cba-9571-882ce69288e0" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065347Z:46c32fba-bfe5-4751-b2a3-eecc71f789b3" ], - "Date": [ "Wed, 07 Jul 2021 06:53:47 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083908Z:bea24cd1-b43f-434a-a800-f84a2d4ce869" ], + "Date": [ "Wed, 29 Mar 2023 08:39:07 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "121" ], + "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"5bb34616-77ea-7d4b-b29a-872d687483f1\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:49:44.64Z\"\n }", + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", "isContentBase64": false } }, - "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31+10": { + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+10": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "12" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "13" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -392,38 +392,489 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11989" ], - "x-ms-correlation-request-id": [ "f64a69b7-a5c5-4d61-a45c-efeebf86011f" ], - "x-ms-request-id": [ "4a63c13e-029e-4763-9c2a-3b8e951fa6bd" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11978" ], + "x-ms-correlation-request-id": [ "2d4cb3a9-d54b-4afd-aa79-7974ff6a145c" ], + "x-ms-request-id": [ "6aba0d9c-4348-4432-9d5d-803dc4964a41" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065418Z:f64a69b7-a5c5-4d61-a45c-efeebf86011f" ], - "Date": [ "Wed, 07 Jul 2021 06:54:17 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T083938Z:2d4cb3a9-d54b-4afd-aa79-7974ff6a145c" ], + "Date": [ "Wed, 29 Mar 2023 08:39:38 GMT" ] }, "ContentHeaders": { - "Content-Length": [ "165" ], + "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"5bb34616-77ea-7d4b-b29a-872d687483f1\",\n \"status\": \"Succeeded\",\n \"startTime\": \"2021-07-07T06:49:44.64Z\",\n \"endTime\": \"2021-07-07T06:53:55.0247338Z\"\n }", + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", "isContentBase64": false } }, - "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operationresults/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31+11": { + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+11": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operationresults/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "13" ], - "x-ms-client-request-id": [ "6bc22646-197a-4e69-a0f7-63d219efd67e" ], + "x-ms-unique-id": [ "14" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11977" ], + "x-ms-correlation-request-id": [ "d4c239b5-fc1b-4bd2-ad1c-57f5c862426f" ], + "x-ms-request-id": [ "11b3d49c-efbd-4acb-ac4c-b16dfd189e98" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084009Z:d4c239b5-fc1b-4bd2-ad1c-57f5c862426f" ], + "Date": [ "Wed, 29 Mar 2023 08:40:09 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+12": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "15" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11976" ], + "x-ms-correlation-request-id": [ "cb1c8971-4273-4e69-a255-662e78ff5b07" ], + "x-ms-request-id": [ "1ee61839-6cff-4e25-ae17-50d51dc2ffe5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084040Z:cb1c8971-4273-4e69-a255-662e78ff5b07" ], + "Date": [ "Wed, 29 Mar 2023 08:40:39 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+13": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "16" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11975" ], + "x-ms-correlation-request-id": [ "1f328a78-2388-4a26-a020-63c68ace1841" ], + "x-ms-request-id": [ "370ff4dc-6e11-4398-a7c6-d87ca5c8d567" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084110Z:1f328a78-2388-4a26-a020-63c68ace1841" ], + "Date": [ "Wed, 29 Mar 2023 08:41:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+14": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "17" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11974" ], + "x-ms-correlation-request-id": [ "89c1e458-ba6b-40e6-80c2-e9490f761611" ], + "x-ms-request-id": [ "e89ecc89-3c8d-4945-9796-013d7a6a7129" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084140Z:89c1e458-ba6b-40e6-80c2-e9490f761611" ], + "Date": [ "Wed, 29 Mar 2023 08:41:40 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+15": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "18" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11973" ], + "x-ms-correlation-request-id": [ "03af9af9-ec3e-4a87-b3c6-9f0bac35df35" ], + "x-ms-request-id": [ "371c0d05-0fa9-4cf7-a0ea-c0ee87f4664b" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084211Z:03af9af9-ec3e-4a87-b3c6-9f0bac35df35" ], + "Date": [ "Wed, 29 Mar 2023 08:42:10 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+16": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "19" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11972" ], + "x-ms-correlation-request-id": [ "2cc988b9-8972-4b38-90e1-b70a817ce3b2" ], + "x-ms-request-id": [ "c730420c-d94c-4db2-876b-6a788a08e1f7" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084242Z:2cc988b9-8972-4b38-90e1-b70a817ce3b2" ], + "Date": [ "Wed, 29 Mar 2023 08:42:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+17": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "20" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11971" ], + "x-ms-correlation-request-id": [ "6d9ba40b-6708-46a4-b1a1-54f4f0608edf" ], + "x-ms-request-id": [ "d5ed71dd-2041-45ab-9f6a-b41d643cd5ed" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084312Z:6d9ba40b-6708-46a4-b1a1-54f4f0608edf" ], + "Date": [ "Wed, 29 Mar 2023 08:43:11 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+18": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "21" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11970" ], + "x-ms-correlation-request-id": [ "9d34fc29-3e74-4d4c-9de0-47d66df1b061" ], + "x-ms-request-id": [ "782667bb-76d0-4676-9da4-1ab5d0fca44e" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084342Z:9d34fc29-3e74-4d4c-9de0-47d66df1b061" ], + "Date": [ "Wed, 29 Mar 2023 08:43:41 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+19": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "22" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11969" ], + "x-ms-correlation-request-id": [ "f82a3051-4519-4d78-af84-65f60dba8b22" ], + "x-ms-request-id": [ "80d41018-c7b4-4210-bded-7a10632398df" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084413Z:f82a3051-4519-4d78-af84-65f60dba8b22" ], + "Date": [ "Wed, 29 Mar 2023 08:44:12 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+20": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "23" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11968" ], + "x-ms-correlation-request-id": [ "ead36512-8144-4690-a4ec-5b4063757224" ], + "x-ms-request-id": [ "cd724ae4-f8c0-43da-8ac1-89533eb47eff" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084443Z:ead36512-8144-4690-a4ec-5b4063757224" ], + "Date": [ "Wed, 29 Mar 2023 08:44:42 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "126" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+21": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "24" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], + "CommandName": [ "Start-AzAksCluster" ], + "FullCommandName": [ "Start-AzAksCluster_Start" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11967" ], + "x-ms-correlation-request-id": [ "a568fd25-edd7-436a-bde6-c48454cdcd3a" ], + "x-ms-request-id": [ "9c56ce76-aa7e-4d21-a486-1ec5512ad5f5" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084514Z:a568fd25-edd7-436a-bde6-c48454cdcd3a" ], + "Date": [ "Wed, 29 Mar 2023 08:45:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "170" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"name\": \"a9e32197-d403-9242-9d07-8beb933ffbd8\",\n \"status\": \"Succeeded\",\n \"startTime\": \"2023-03-29T08:35:05.0675407Z\",\n \"endTime\": \"2023-03-29T08:44:49.7386895Z\"\n }", + "isContentBase64": false + } + }, + "Start-AzAksCluster+[NoContext]+Start+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31+22": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "25" ], + "x-ms-client-request-id": [ "5b297996-b899-42ca-9309-b087e757eb9a" ], "CommandName": [ "Start-AzAksCluster" ], "FullCommandName": [ "Start-AzAksCluster_Start" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -433,15 +884,15 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operationresults/1646b35b-ea77-4b7d-b29a-872d687483f1?api-version=2017-08-31" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11988" ], - "x-ms-correlation-request-id": [ "4242679e-5930-4c0b-b62c-bd8a33e266b4" ], - "x-ms-request-id": [ "bcc150f2-d931-4bc0-ba96-877151dac839" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/9721e3a9-03d4-4292-9d07-8beb933ffbd8?api-version=2017-08-31" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11966" ], + "x-ms-correlation-request-id": [ "6139c7bf-7a18-49fc-848d-6f8e1689551e" ], + "x-ms-request-id": [ "e970be68-8c82-4e26-99b2-9f5b109955bd" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065418Z:4242679e-5930-4c0b-b62c-bd8a33e266b4" ], - "Date": [ "Wed, 07 Jul 2021 06:54:17 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084515Z:6139c7bf-7a18-49fc-848d-6f8e1689551e" ], + "Date": [ "Wed, 29 Mar 2023 08:45:14 GMT" ] }, "ContentHeaders": { "Content-Type": [ "application/json" ], diff --git a/src/Aks/Aks.Autorest/test/Start-AzAksManagedClusterCommand.Recording.json b/src/Aks/Aks.Autorest/test/Start-AzAksManagedClusterCommand.Recording.json new file mode 100644 index 000000000000..d59ae16ac5d0 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Start-AzAksManagedClusterCommand.Recording.json @@ -0,0 +1,238 @@ +{ + "Start-AzAksManagedClusterCommand+[NoContext]+RunExpanded+$POST+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/runCommand?api-version=2023-02-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/runCommand?api-version=2023-02-01", + "Content": "{\r\n \"command\": \"kubectl get pods --all-namespaces -o wide\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "62" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/commandResults/b3d43a270409499498a409a2ee4a3fb4?api-version=2023-02-01" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1199" ], + "x-ms-correlation-request-id": [ "722386ab-9cc9-4a11-9125-17d2452c9f1d" ], + "x-ms-request-id": [ "b3d43a27-0409-4994-98a4-09a2ee4a3fb4" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T085143Z:722386ab-9cc9-4a11-9125-17d2452c9f1d" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Fri, 31 Mar 2023 08:51:42 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "Start-AzAksManagedClusterCommand+[NoContext]+RunExpanded+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/commandResults/b3d43a270409499498a409a2ee4a3fb4?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/commandResults/b3d43a270409499498a409a2ee4a3fb4?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "2" ], + "x-ms-client-request-id": [ "67bd9f10-c83a-4595-9be9-ea16062c7a78" ], + "CommandName": [ "Start-AzAksManagedClusterCommand" ], + "FullCommandName": [ "Start-AzAksManagedClusterCommand_RunExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T085213Z:7c66cfce-8896-4cc9-b0cb-c2c5c6f95c40" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11999" ], + "x-ms-correlation-request-id": [ "7c66cfce-8896-4cc9-b0cb-c2c5c6f95c40" ], + "x-ms-request-id": [ "3d3956f7-3979-4310-a489-47e600bd5bcb" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "Date": [ "Fri, 31 Mar 2023 08:52:13 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4745" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"b3d43a270409499498a409a2ee4a3fb4\",\n \"properties\": {\n \"provisioningState\": \"Succeeded\",\n \"exitCode\": 0,\n \"startedAt\": \"2023-03-31T08:51:44Z\",\n \"finishedAt\": \"2023-03-31T08:51:45Z\",\n \"logs\": \"NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES\\naks-command command-33ddee0548b342bcbd2f0b6e997bb538 0/1 Completed 0 81s 10.224.0.44 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\naks-command command-836aff9b9f2d4be8ac6b424cf302204f 0/1 Error 0 15m 10.224.0.44 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\naks-command command-b3d43a270409499498a409a2ee4a3fb4 1/1 Running 0 2s 10.224.0.60 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\naks-command command-e4b2b1c20a4a42c095051f2fd88215cc 0/1 Completed 0 3m30s 10.224.0.42 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\naks-command command-f479e67f0f894b6b8f4346b25d7c37a2 0/1 Error 0 13m 10.224.0.41 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\naks-command command-f4a7168c91444783b6859ef340bcc4d2 0/1 Completed 0 8m49s 10.224.0.56 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system azure-ip-masq-agent-qxkm7 1/1 Running 0 45m 10.224.0.4 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system azure-ip-masq-agent-r4vck 1/1 Running 0 42m 10.224.0.33 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system cloud-node-manager-2hzb5 1/1 Running 0 45m 10.224.0.4 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system cloud-node-manager-vzc5c 1/1 Running 0 42m 10.224.0.33 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system coredns-59b6bf8b4f-5fbhk 1/1 Running 0 46m 10.224.0.7 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system coredns-59b6bf8b4f-qzznn 1/1 Running 0 45m 10.224.0.16 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system coredns-autoscaler-5655d66f64-tlksg 1/1 Running 0 46m 10.224.0.17 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system csi-azuredisk-node-cl6nj 3/3 Running 0 42m 10.224.0.33 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system csi-azuredisk-node-sgnc6 3/3 Running 0 45m 10.224.0.4 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system csi-azurefile-node-7bfjl 3/3 Running 0 45m 10.224.0.4 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system csi-azurefile-node-whw8w 3/3 Running 0 42m 10.224.0.33 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system konnectivity-agent-bbf6c99bf-fpsxt 1/1 Running 0 13m 10.224.0.43 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system konnectivity-agent-bbf6c99bf-jhlxf 1/1 Running 0 13m 10.224.0.25 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system kube-proxy-2glr5 1/1 Running 0 42m 10.224.0.33 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system kube-proxy-bmwws 1/1 Running 0 45m 10.224.0.4 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system metrics-server-8655f897d8-2t6bt 2/2 Running 0 42m 10.224.0.11 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system metrics-server-8655f897d8-mnrbj 2/2 Running 0 42m 10.224.0.38 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\n\"\n }\n }", + "isContentBase64": false + } + }, + "Start-AzAksManagedClusterCommand+[NoContext]+RunExpanded+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/commandResults/b3d43a270409499498a409a2ee4a3fb4?api-version=2023-02-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/commandResults/b3d43a270409499498a409a2ee4a3fb4?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "3" ], + "x-ms-client-request-id": [ "67bd9f10-c83a-4595-9be9-ea16062c7a78" ], + "CommandName": [ "Start-AzAksManagedClusterCommand" ], + "FullCommandName": [ "Start-AzAksManagedClusterCommand_RunExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T085214Z:c64ce113-8d97-43e9-a1c6-5b20e220f79d" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11998" ], + "x-ms-correlation-request-id": [ "c64ce113-8d97-43e9-a1c6-5b20e220f79d" ], + "x-ms-request-id": [ "f9d9795a-95ad-49d0-997f-60fc1e99f517" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "Date": [ "Fri, 31 Mar 2023 08:52:14 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "4745" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"b3d43a270409499498a409a2ee4a3fb4\",\n \"properties\": {\n \"provisioningState\": \"Succeeded\",\n \"exitCode\": 0,\n \"startedAt\": \"2023-03-31T08:51:44Z\",\n \"finishedAt\": \"2023-03-31T08:51:45Z\",\n \"logs\": \"NAMESPACE NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES\\naks-command command-33ddee0548b342bcbd2f0b6e997bb538 0/1 Completed 0 81s 10.224.0.44 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\naks-command command-836aff9b9f2d4be8ac6b424cf302204f 0/1 Error 0 15m 10.224.0.44 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\naks-command command-b3d43a270409499498a409a2ee4a3fb4 1/1 Running 0 2s 10.224.0.60 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\naks-command command-e4b2b1c20a4a42c095051f2fd88215cc 0/1 Completed 0 3m30s 10.224.0.42 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\naks-command command-f479e67f0f894b6b8f4346b25d7c37a2 0/1 Error 0 13m 10.224.0.41 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\naks-command command-f4a7168c91444783b6859ef340bcc4d2 0/1 Completed 0 8m49s 10.224.0.56 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system azure-ip-masq-agent-qxkm7 1/1 Running 0 45m 10.224.0.4 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system azure-ip-masq-agent-r4vck 1/1 Running 0 42m 10.224.0.33 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system cloud-node-manager-2hzb5 1/1 Running 0 45m 10.224.0.4 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system cloud-node-manager-vzc5c 1/1 Running 0 42m 10.224.0.33 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system coredns-59b6bf8b4f-5fbhk 1/1 Running 0 46m 10.224.0.7 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system coredns-59b6bf8b4f-qzznn 1/1 Running 0 45m 10.224.0.16 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system coredns-autoscaler-5655d66f64-tlksg 1/1 Running 0 46m 10.224.0.17 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system csi-azuredisk-node-cl6nj 3/3 Running 0 42m 10.224.0.33 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system csi-azuredisk-node-sgnc6 3/3 Running 0 45m 10.224.0.4 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system csi-azurefile-node-7bfjl 3/3 Running 0 45m 10.224.0.4 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system csi-azurefile-node-whw8w 3/3 Running 0 42m 10.224.0.33 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system konnectivity-agent-bbf6c99bf-fpsxt 1/1 Running 0 13m 10.224.0.43 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system konnectivity-agent-bbf6c99bf-jhlxf 1/1 Running 0 13m 10.224.0.25 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system kube-proxy-2glr5 1/1 Running 0 42m 10.224.0.33 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system kube-proxy-bmwws 1/1 Running 0 45m 10.224.0.4 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system metrics-server-8655f897d8-2t6bt 2/2 Running 0 42m 10.224.0.11 aks-default-40136599-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\nkube-system metrics-server-8655f897d8-mnrbj 2/2 Running 0 42m 10.224.0.38 aks-pool2-22198594-vmss000000 \\u003cnone\\u003e \\u003cnone\\u003e\\n\"\n }\n }", + "isContentBase64": false + } + }, + "Start-AzAksManagedClusterCommand+[NoContext]+RunViaIdentityExpanded+$POST+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/runCommand?api-version=2023-02-01+1": { + "Request": { + "Method": "POST", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/runCommand?api-version=2023-02-01", + "Content": "{\r\n \"command\": \"kubectl get nodes\"\r\n}", + "isContentBase64": false, + "Headers": { + }, + "ContentHeaders": { + "Content-Type": [ "application/json" ], + "Content-Length": [ "38" ] + } + }, + "Response": { + "StatusCode": 202, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/commandResults/0a3991475d9744fcbfdc2595b40e517f?api-version=2023-02-01" ], + "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], + "x-ms-correlation-request-id": [ "afec4173-8b17-42b7-8459-da1e54025fd9" ], + "x-ms-request-id": [ "0a399147-5d97-44fc-bfdc-2595b40e517f" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T085215Z:afec4173-8b17-42b7-8459-da1e54025fd9" ], + "X-Content-Type-Options": [ "nosniff" ], + "Date": [ "Fri, 31 Mar 2023 08:52:15 GMT" ] + }, + "ContentHeaders": { + "Expires": [ "-1" ], + "Content-Length": [ "0" ] + }, + "Content": null, + "isContentBase64": false + } + }, + "Start-AzAksManagedClusterCommand+[NoContext]+RunViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/commandResults/0a3991475d9744fcbfdc2595b40e517f?api-version=2023-02-01+2": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/commandResults/0a3991475d9744fcbfdc2595b40e517f?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "5" ], + "x-ms-client-request-id": [ "15cc242a-5c77-4f1e-b179-e2939214870f" ], + "CommandName": [ "Start-AzAksManagedClusterCommand" ], + "FullCommandName": [ "Start-AzAksManagedClusterCommand_RunViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11997" ], + "x-ms-correlation-request-id": [ "913c251f-9ebf-4070-a1fd-17c8b626b1eb" ], + "x-ms-request-id": [ "37c3e7c7-fab3-481e-81b2-5f7ee0020817" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T085246Z:913c251f-9ebf-4070-a1fd-17c8b626b1eb" ], + "Date": [ "Fri, 31 Mar 2023 08:52:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "418" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"0a3991475d9744fcbfdc2595b40e517f\",\n \"properties\": {\n \"provisioningState\": \"Succeeded\",\n \"exitCode\": 0,\n \"startedAt\": \"2023-03-31T08:52:16Z\",\n \"finishedAt\": \"2023-03-31T08:52:17Z\",\n \"logs\": \"NAME STATUS ROLES AGE VERSION\\naks-default-40136599-vmss000000 Ready agent 46m v1.24.9\\naks-pool2-22198594-vmss000000 Ready agent 43m v1.24.9\\n\"\n }\n }", + "isContentBase64": false + } + }, + "Start-AzAksManagedClusterCommand+[NoContext]+RunViaIdentityExpanded+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/commandResults/0a3991475d9744fcbfdc2595b40e517f?api-version=2023-02-01+3": { + "Request": { + "Method": "GET", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedclusters/aks/commandResults/0a3991475d9744fcbfdc2595b40e517f?api-version=2023-02-01", + "Content": null, + "isContentBase64": false, + "Headers": { + "Authorization": [ "[Filtered]" ], + "x-ms-unique-id": [ "6" ], + "x-ms-client-request-id": [ "15cc242a-5c77-4f1e-b179-e2939214870f" ], + "CommandName": [ "Start-AzAksManagedClusterCommand" ], + "FullCommandName": [ "Start-AzAksManagedClusterCommand_RunViaIdentityExpanded" ], + "ParameterSetName": [ "__AllParameterSets" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] + }, + "ContentHeaders": { + } + }, + "Response": { + "StatusCode": 200, + "Headers": { + "Cache-Control": [ "no-cache" ], + "Pragma": [ "no-cache" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11996" ], + "x-ms-correlation-request-id": [ "95da8b1f-073e-4668-b401-139650bce4be" ], + "x-ms-request-id": [ "a2b3f061-43df-43a7-96a1-615981d8deaf" ], + "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], + "X-Content-Type-Options": [ "nosniff" ], + "Server": [ "nginx" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230331T085246Z:95da8b1f-073e-4668-b401-139650bce4be" ], + "Date": [ "Fri, 31 Mar 2023 08:52:46 GMT" ] + }, + "ContentHeaders": { + "Content-Length": [ "418" ], + "Content-Type": [ "application/json" ], + "Expires": [ "-1" ] + }, + "Content": "{\n \"id\": \"0a3991475d9744fcbfdc2595b40e517f\",\n \"properties\": {\n \"provisioningState\": \"Succeeded\",\n \"exitCode\": 0,\n \"startedAt\": \"2023-03-31T08:52:16Z\",\n \"finishedAt\": \"2023-03-31T08:52:17Z\",\n \"logs\": \"NAME STATUS ROLES AGE VERSION\\naks-default-40136599-vmss000000 Ready agent 46m v1.24.9\\naks-pool2-22198594-vmss000000 Ready agent 43m v1.24.9\\n\"\n }\n }", + "isContentBase64": false + } + } +} \ No newline at end of file diff --git a/src/Aks/Aks.Autorest/test/Start-AzAksManagedClusterCommand.Tests.ps1 b/src/Aks/Aks.Autorest/test/Start-AzAksManagedClusterCommand.Tests.ps1 new file mode 100644 index 000000000000..637809d70874 --- /dev/null +++ b/src/Aks/Aks.Autorest/test/Start-AzAksManagedClusterCommand.Tests.ps1 @@ -0,0 +1,34 @@ +if(($null -eq $TestName) -or ($TestName -contains 'Start-AzAksManagedClusterCommand')) +{ + $loadEnvPath = Join-Path $PSScriptRoot 'loadEnv.ps1' + if (-Not (Test-Path -Path $loadEnvPath)) { + $loadEnvPath = Join-Path $PSScriptRoot '..\loadEnv.ps1' + } + . ($loadEnvPath) + $TestRecordingFile = Join-Path $PSScriptRoot 'Start-AzAksManagedClusterCommand.Recording.json' + $currentPath = $PSScriptRoot + while(-not $mockingPath) { + $mockingPath = Get-ChildItem -Path $currentPath -Recurse -Include 'HttpPipelineMocking.ps1' -File + $currentPath = Split-Path -Path $currentPath -Parent + } + . ($mockingPath | Select-Object -First 1).FullName +} + +Describe 'Start-AzAksManagedClusterCommand' { + It 'RunExpanded' { + $result = Start-AzAksManagedClusterCommand -ResourceGroupName $env.ResourceGroupName -ResourceName $env.AksName -Command "kubectl get pods --all-namespaces -o wide" + $result.ProvisioningState | Should -Be 'Succeeded' + $result.ExitCode | Should -Be 0 + $result.Log.contains("aks-command") | Should -Be $true + $result.Log.contains("kube-system") | Should -Be $true + } + + It 'RunViaIdentityExpanded' { + $aks = @{Id = "/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourcegroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks"} + $result = Start-AzAksManagedClusterCommand -InputObject $aks -Command "kubectl get nodes" + $result.ProvisioningState | Should -Be 'Succeeded' + $result.ExitCode | Should -Be 0 + $result.Log.contains("aks-default") | Should -Be $true + $result.Log.contains("aks-pool2") | Should -Be $true + } +} diff --git a/src/Aks/Aks.Autorest/test/Stop-AzAksCluster.Recording.json b/src/Aks/Aks.Autorest/test/Stop-AzAksCluster.Recording.json index aa03fb971575..60498e28ed1a 100644 --- a/src/Aks/Aks.Autorest/test/Stop-AzAksCluster.Recording.json +++ b/src/Aks/Aks.Autorest/test/Stop-AzAksCluster.Recording.json @@ -1,17 +1,17 @@ { - "Stop-AzAksCluster+[NoContext]+Stop+$POST+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/stop?api-version=2020-09-01+1": { + "Stop-AzAksCluster+[NoContext]+Stop+$POST+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/stop?api-version=2023-02-01+1": { "Request": { "Method": "POST", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/stop?api-version=2020-09-01", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/resourceGroups/aks-test/providers/Microsoft.ContainerService/managedClusters/aks/stop?api-version=2023-02-01", "Content": null, "isContentBase64": false, "Headers": { - "x-ms-unique-id": [ "14" ], - "x-ms-client-request-id": [ "6110c0d7-75a7-4ddb-8ccf-091554bbd094" ], + "x-ms-unique-id": [ "26" ], + "x-ms-client-request-id": [ "c19bd291-6496-4f7b-b694-55705a11ba73" ], "CommandName": [ "Stop-AzAksCluster" ], "FullCommandName": [ "Stop-AzAksCluster_Stop" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ], + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ], "Authorization": [ "[Filtered]" ] }, "ContentHeaders": { @@ -22,16 +22,16 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operationresults/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31" ], "x-ms-ratelimit-remaining-subscription-writes": [ "1198" ], - "Azure-AsyncOperation": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31" ], - "x-ms-correlation-request-id": [ "379b5e62-d750-48cc-9e55-dfb32d9875d1" ], - "x-ms-request-id": [ "5e2e9633-c873-469d-8d3a-9f0e98668750" ], + "azure-asyncoperation": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31" ], + "x-ms-correlation-request-id": [ "44b1e101-b37e-46a5-b39d-5e7eb1aa6204" ], + "x-ms-request-id": [ "fc314390-7c36-4811-b2ea-a7cb77724e2f" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065419Z:379b5e62-d750-48cc-9e55-dfb32d9875d1" ], + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084516Z:44b1e101-b37e-46a5-b39d-5e7eb1aa6204" ], "X-Content-Type-Options": [ "nosniff" ], - "Date": [ "Wed, 07 Jul 2021 06:54:18 GMT" ] + "Date": [ "Wed, 29 Mar 2023 08:45:15 GMT" ] }, "ContentHeaders": { "Expires": [ "-1" ], @@ -41,20 +41,20 @@ "isContentBase64": false } }, - "Stop-AzAksCluster+[NoContext]+Stop+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31+2": { + "Stop-AzAksCluster+[NoContext]+Stop+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31+2": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "15" ], - "x-ms-client-request-id": [ "6110c0d7-75a7-4ddb-8ccf-091554bbd094" ], + "x-ms-unique-id": [ "27" ], + "x-ms-client-request-id": [ "c19bd291-6496-4f7b-b694-55705a11ba73" ], "CommandName": [ "Stop-AzAksCluster" ], "FullCommandName": [ "Stop-AzAksCluster_Stop" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -64,38 +64,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11987" ], - "x-ms-correlation-request-id": [ "d67a74e3-b417-48c3-aeb4-e729bc8e530b" ], - "x-ms-request-id": [ "d4caea6a-78e9-481b-a959-5292f836d524" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11965" ], + "x-ms-correlation-request-id": [ "becfbea5-f67e-4c83-9eb1-75ee68e6b774" ], + "x-ms-request-id": [ "33bd0f2d-cded-4496-a88c-572bd794f24b" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065450Z:d67a74e3-b417-48c3-aeb4-e729bc8e530b" ], - "Date": [ "Wed, 07 Jul 2021 06:54:49 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084546Z:becfbea5-f67e-4c83-9eb1-75ee68e6b774" ], + "Date": [ "Wed, 29 Mar 2023 08:45:46 GMT" ] }, "ContentHeaders": { "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"33962e5e-73c8-9d46-8d3a-9f0e98668750\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:54:19.3966666Z\"\n }", + "Content": "{\n \"name\": \"904331fc-367c-1148-b2ea-a7cb77724e2f\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:45:16.0209701Z\"\n }", "isContentBase64": false } }, - "Stop-AzAksCluster+[NoContext]+Stop+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31+3": { + "Stop-AzAksCluster+[NoContext]+Stop+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31+3": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "16" ], - "x-ms-client-request-id": [ "6110c0d7-75a7-4ddb-8ccf-091554bbd094" ], + "x-ms-unique-id": [ "28" ], + "x-ms-client-request-id": [ "c19bd291-6496-4f7b-b694-55705a11ba73" ], "CommandName": [ "Stop-AzAksCluster" ], "FullCommandName": [ "Stop-AzAksCluster_Stop" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -105,38 +105,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11986" ], - "x-ms-correlation-request-id": [ "6828a89b-7c7d-4e51-946a-c1167614b589" ], - "x-ms-request-id": [ "78a05ab1-9f9a-4d4f-bf46-47055d39abd7" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11964" ], + "x-ms-correlation-request-id": [ "f2ec86bc-cf29-4d9d-99ac-d5c2f290f462" ], + "x-ms-request-id": [ "d431bc7d-a886-4205-811a-2fabd422aa4c" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065520Z:6828a89b-7c7d-4e51-946a-c1167614b589" ], - "Date": [ "Wed, 07 Jul 2021 06:55:19 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084617Z:f2ec86bc-cf29-4d9d-99ac-d5c2f290f462" ], + "Date": [ "Wed, 29 Mar 2023 08:46:16 GMT" ] }, "ContentHeaders": { "Content-Length": [ "126" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"33962e5e-73c8-9d46-8d3a-9f0e98668750\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:54:19.3966666Z\"\n }", + "Content": "{\n \"name\": \"904331fc-367c-1148-b2ea-a7cb77724e2f\",\n \"status\": \"InProgress\",\n \"startTime\": \"2023-03-29T08:45:16.0209701Z\"\n }", "isContentBase64": false } }, - "Stop-AzAksCluster+[NoContext]+Stop+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31+4": { + "Stop-AzAksCluster+[NoContext]+Stop+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31+4": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operations/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "17" ], - "x-ms-client-request-id": [ "6110c0d7-75a7-4ddb-8ccf-091554bbd094" ], + "x-ms-unique-id": [ "29" ], + "x-ms-client-request-id": [ "c19bd291-6496-4f7b-b694-55705a11ba73" ], "CommandName": [ "Stop-AzAksCluster" ], "FullCommandName": [ "Stop-AzAksCluster_Stop" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -146,79 +146,38 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11985" ], - "x-ms-correlation-request-id": [ "626d1379-a7bc-424b-8c69-923e5e6987d5" ], - "x-ms-request-id": [ "cd3c3006-c6be-4cc3-8335-d91db4964f09" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11963" ], + "x-ms-correlation-request-id": [ "4b422a2b-2240-4b34-bc8c-2e6d7caafa80" ], + "x-ms-request-id": [ "01df5e07-2571-4481-8a14-3fc47838fc94" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065550Z:626d1379-a7bc-424b-8c69-923e5e6987d5" ], - "Date": [ "Wed, 07 Jul 2021 06:55:50 GMT" ] - }, - "ContentHeaders": { - "Content-Length": [ "126" ], - "Content-Type": [ "application/json" ], - "Expires": [ "-1" ] - }, - "Content": "{\n \"name\": \"33962e5e-73c8-9d46-8d3a-9f0e98668750\",\n \"status\": \"InProgress\",\n \"startTime\": \"2021-07-07T06:54:19.3966666Z\"\n }", - "isContentBase64": false - } - }, - "Stop-AzAksCluster+[NoContext]+Stop+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31+5": { - "Request": { - "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operations/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31", - "Content": null, - "isContentBase64": false, - "Headers": { - "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "18" ], - "x-ms-client-request-id": [ "6110c0d7-75a7-4ddb-8ccf-091554bbd094" ], - "CommandName": [ "Stop-AzAksCluster" ], - "FullCommandName": [ "Stop-AzAksCluster_Stop" ], - "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] - }, - "ContentHeaders": { - } - }, - "Response": { - "StatusCode": 200, - "Headers": { - "Cache-Control": [ "no-cache" ], - "Pragma": [ "no-cache" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11984" ], - "x-ms-correlation-request-id": [ "63bbb29d-066a-4419-9a62-afd687eb911e" ], - "x-ms-request-id": [ "d672ffe3-1211-4e6e-99b2-dc794ef22ea8" ], - "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], - "X-Content-Type-Options": [ "nosniff" ], - "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065621Z:63bbb29d-066a-4419-9a62-afd687eb911e" ], - "Date": [ "Wed, 07 Jul 2021 06:56:20 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084647Z:4b422a2b-2240-4b34-bc8c-2e6d7caafa80" ], + "Date": [ "Wed, 29 Mar 2023 08:46:46 GMT" ] }, "ContentHeaders": { "Content-Length": [ "170" ], "Content-Type": [ "application/json" ], "Expires": [ "-1" ] }, - "Content": "{\n \"name\": \"33962e5e-73c8-9d46-8d3a-9f0e98668750\",\n \"status\": \"Succeeded\",\n \"startTime\": \"2021-07-07T06:54:19.3966666Z\",\n \"endTime\": \"2021-07-07T06:56:12.6236822Z\"\n }", + "Content": "{\n \"name\": \"904331fc-367c-1148-b2ea-a7cb77724e2f\",\n \"status\": \"Succeeded\",\n \"startTime\": \"2023-03-29T08:45:16.0209701Z\",\n \"endTime\": \"2023-03-29T08:46:35.9693182Z\"\n }", "isContentBase64": false } }, - "Stop-AzAksCluster+[NoContext]+Stop+$GET+https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operationresults/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31+6": { + "Stop-AzAksCluster+[NoContext]+Stop+$GET+https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31+5": { "Request": { "Method": "GET", - "RequestUri": "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operationresults/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31", + "RequestUri": "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31", "Content": null, "isContentBase64": false, "Headers": { "Authorization": [ "[Filtered]" ], - "x-ms-unique-id": [ "19" ], - "x-ms-client-request-id": [ "6110c0d7-75a7-4ddb-8ccf-091554bbd094" ], + "x-ms-unique-id": [ "30" ], + "x-ms-client-request-id": [ "c19bd291-6496-4f7b-b694-55705a11ba73" ], "CommandName": [ "Stop-AzAksCluster" ], "FullCommandName": [ "Stop-AzAksCluster_Stop" ], "ParameterSetName": [ "__AllParameterSets" ], - "User-Agent": [ "AzurePowershell/Az4.0.0-preview" ] + "User-Agent": [ "AzurePowershell/v0.0.0", "PSVersion/v7.2.9", "Az.Aks/0.1.0" ] }, "ContentHeaders": { } @@ -228,15 +187,15 @@ "Headers": { "Cache-Control": [ "no-cache" ], "Pragma": [ "no-cache" ], - "Location": [ "https://management.azure.com/subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/providers/Microsoft.ContainerService/locations/eastus/operationresults/5e2e9633-c873-469d-8d3a-9f0e98668750?api-version=2017-08-31" ], - "x-ms-ratelimit-remaining-subscription-reads": [ "11983" ], - "x-ms-correlation-request-id": [ "661667df-a922-41b0-b265-d887adab5394" ], - "x-ms-request-id": [ "311f7508-ef75-4199-a6f3-ca5c1e7c6542" ], + "Location": [ "https://management.azure.com/subscriptions/0b1f6471-1bf0-4dda-aec3-cb9272f09590/providers/Microsoft.ContainerService/locations/eastus/operationresults/fc314390-7c36-4811-b2ea-a7cb77724e2f?api-version=2017-08-31" ], + "x-ms-ratelimit-remaining-subscription-reads": [ "11962" ], + "x-ms-correlation-request-id": [ "27a21b03-0162-4092-8b64-c0b6c8237ac4" ], + "x-ms-request-id": [ "acc6480d-e97f-4ab7-a757-bdc15de1f247" ], "Strict-Transport-Security": [ "max-age=31536000; includeSubDomains" ], "X-Content-Type-Options": [ "nosniff" ], "Server": [ "nginx" ], - "x-ms-routing-request-id": [ "SOUTHEASTASIA:20210707T065621Z:661667df-a922-41b0-b265-d887adab5394" ], - "Date": [ "Wed, 07 Jul 2021 06:56:21 GMT" ] + "x-ms-routing-request-id": [ "SOUTHEASTASIA:20230329T084647Z:27a21b03-0162-4092-8b64-c0b6c8237ac4" ], + "Date": [ "Wed, 29 Mar 2023 08:46:46 GMT" ] }, "ContentHeaders": { "Content-Type": [ "application/json" ], diff --git a/src/Aks/Aks.Autorest/test/env.json b/src/Aks/Aks.Autorest/test/env.json index 215531524908..6d9f29db6b24 100644 --- a/src/Aks/Aks.Autorest/test/env.json +++ b/src/Aks/Aks.Autorest/test/env.json @@ -1,6 +1,7 @@ { - "Tenant": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "SubscriptionId": "9e223dbe-3399-4e19-88eb-0975f02ac87f", - "ResourceGroupName": "aks-test", - "AksName": "aks" + "location": "eastus", + "Tenant": "54826b22-38d6-4fb2-bad9-b7b93a3e9c5a", + "SubscriptionId": "0b1f6471-1bf0-4dda-aec3-cb9272f09590", + "AksName": "aks", + "ResourceGroupName": "aks-test" } diff --git a/src/Aks/Aks.Autorest/test/utils.ps1 b/src/Aks/Aks.Autorest/test/utils.ps1 index 18610ff83282..a9aef1a27ee7 100644 --- a/src/Aks/Aks.Autorest/test/utils.ps1 +++ b/src/Aks/Aks.Autorest/test/utils.ps1 @@ -13,6 +13,7 @@ function setupEnv() { $env.Tenant = (Get-AzContext).Tenant.Id $env.ResourceGroupName = 'aks-test' $env.AksName = 'aks' + $env.location = 'eastus' # For any resources you created for test, you should add it to $env here. $envFile = 'env.json' if ($TestMode -eq 'live') { diff --git a/src/Aks/Aks/Az.Aks.psd1 b/src/Aks/Aks/Az.Aks.psd1 index 4064a8ed39f2..a30903816357 100644 --- a/src/Aks/Aks/Az.Aks.psd1 +++ b/src/Aks/Aks/Az.Aks.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 3/30/2023 +# Generated on: 4/12/2023 # @{ @@ -76,7 +76,17 @@ NestedModules = @('Microsoft.Azure.PowerShell.Cmdlets.Aks.dll', # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. FunctionsToExport = 'Get-AzAksNodePoolUpgradeProfile', 'Get-AzAksUpgradeProfile', 'Get-AzAksVersion', 'Start-AzAksCluster', 'Stop-AzAksCluster', - 'Install-AzAksCliTool' + 'Install-AzAksCliTool', 'Get-AzAksMaintenanceConfiguration', + 'Get-AzAksManagedClusterCommandResult', + 'Get-AzAksManagedClusterOSOption', + 'Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint', + 'Get-AzAksSnapshot', 'Invoke-AzAksAbortAgentPoolLatestOperation', + 'Invoke-AzAksAbortManagedClusterLatestOperation', + 'Invoke-AzAksRotateManagedClusterServiceAccountSigningKey', + 'New-AzAksMaintenanceConfiguration', 'New-AzAksSnapshot', + 'New-AzAksTimeInWeekObject', 'New-AzAksTimeSpanObject', + 'Remove-AzAksMaintenanceConfiguration', 'Remove-AzAksSnapshot', + 'Start-AzAksManagedClusterCommand' # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. CmdletsToExport = 'Get-AzAksCluster', 'New-AzAksCluster', 'Remove-AzAksCluster', @@ -107,7 +117,8 @@ PrivateData = @{ PSData = @{ # Tags applied to this module. These help with module discovery in online galleries. - Tags = 'Azure','ResourceManager','ARM','AKS','Kubernetes','Container','Orchestrator','Containers','Docker' + Tags = 'Azure', 'ResourceManager', 'ARM', 'AKS', 'Kubernetes', 'Container', + 'Orchestrator', 'Containers', 'Docker' # A URL to the license for this module. LicenseUri = 'https://aka.ms/azps-license' @@ -133,7 +144,7 @@ PrivateData = @{ } # End of PSData hashtable - } # End of PrivateData hashtable +} # End of PrivateData hashtable # HelpInfo URI of this module # HelpInfoURI = '' diff --git a/src/Aks/Aks/help/Az.Aks.md b/src/Aks/Aks/help/Az.Aks.md index 6029e5ce8e01..d4cd6528940f 100644 --- a/src/Aks/Aks/help/Az.Aks.md +++ b/src/Aks/Aks/help/Az.Aks.md @@ -20,14 +20,30 @@ Enable the addons for aks. ### [Get-AzAksCluster](Get-AzAksCluster.md) List Kubernetes managed clusters. +### [Get-AzAksMaintenanceConfiguration](Get-AzAksMaintenanceConfiguration.md) +Gets the specified maintenance configuration of a managed cluster. + +### [Get-AzAksManagedClusterCommandResult](Get-AzAksManagedClusterCommandResult.md) +Gets the results of a command which has been run on the Managed Cluster. + +### [Get-AzAksManagedClusterOSOption](Get-AzAksManagedClusterOSOption.md) +Gets supported OS options in the specified subscription. + +### [Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint](Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md) +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. + ### [Get-AzAksNodePool](Get-AzAksNodePool.md) List node pools in specified cluster. ### [Get-AzAksNodePoolUpgradeProfile](Get-AzAksNodePoolUpgradeProfile.md) -Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. +Gets the upgrade profile for an agent pool. + +### [Get-AzAksSnapshot](Get-AzAksSnapshot.md) +Gets a snapshot. ### [Get-AzAksUpgradeProfile](Get-AzAksUpgradeProfile.md) -Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. +Gets the upgrade profile of a managed cluster. ### [Get-AzAksVersion](Get-AzAksVersion.md) List available version for creating managed Kubernetes cluster. @@ -39,6 +55,19 @@ Import and merge Kubectl config for a managed Kubernetes Cluster. ### [Install-AzAksCliTool](Install-AzAksCliTool.md) Download and install kubectl and kubelogin. +### [Invoke-AzAksAbortAgentPoolLatestOperation](Invoke-AzAksAbortAgentPoolLatestOperation.md) +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. + +### [Invoke-AzAksAbortManagedClusterLatestOperation](Invoke-AzAksAbortManagedClusterLatestOperation.md) +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. + +### [Invoke-AzAksRotateManagedClusterServiceAccountSigningKey](Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md) +Rotates the service account signing keys of a managed cluster. + ### [Invoke-AzAksRunCommand](Invoke-AzAksRunCommand.md) Run a shell command (with kubectl, helm) on your aks cluster, support attaching files as well. @@ -49,15 +78,33 @@ The cmdlet may call below Microsoft Graph API according to input parameters: - POST /servicePrincipals +### [New-AzAksMaintenanceConfiguration](New-AzAksMaintenanceConfiguration.md) +Creates or updates a maintenance configuration in the specified managed cluster. + ### [New-AzAksNodePool](New-AzAksNodePool.md) Create a new node pool in specified cluster. +### [New-AzAksSnapshot](New-AzAksSnapshot.md) +Creates or updates a snapshot. + +### [New-AzAksTimeInWeekObject](New-AzAksTimeInWeekObject.md) +Create an in-memory object for TimeInWeek. + +### [New-AzAksTimeSpanObject](New-AzAksTimeSpanObject.md) +Create an in-memory object for TimeSpan. + ### [Remove-AzAksCluster](Remove-AzAksCluster.md) Delete a managed Kubernetes cluster. +### [Remove-AzAksMaintenanceConfiguration](Remove-AzAksMaintenanceConfiguration.md) +Deletes a maintenance configuration. + ### [Remove-AzAksNodePool](Remove-AzAksNodePool.md) Delete node pool from managed cluster. +### [Remove-AzAksSnapshot](Remove-AzAksSnapshot.md) +Deletes a snapshot. + ### [Set-AzAksCluster](Set-AzAksCluster.md) Update or create a managed Kubernetes cluster. @@ -65,13 +112,21 @@ Update or create a managed Kubernetes cluster. Reset the ServicePrincipal of an existing AKS cluster. ### [Start-AzAksCluster](Start-AzAksCluster.md) -Starts a Stopped Managed Cluster +See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. ### [Start-AzAksDashboard](Start-AzAksDashboard.md) Create a Kubectl SSH tunnel to the managed cluster's dashboard. +### [Start-AzAksManagedClusterCommand](Start-AzAksManagedClusterCommand.md) +AKS will create a pod to run the command. +This is primarily useful for private clusters. +For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + ### [Stop-AzAksCluster](Stop-AzAksCluster.md) -Stops a Running Managed Cluster +This can only be performed on Azure Virtual Machine Scale set backed clusters. +Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. +A cluster does not accrue charges while it is stopped. +See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. ### [Stop-AzAksDashboard](Stop-AzAksDashboard.md) Stop the Kubectl SSH tunnel created in Start-AzKubernetesDashboard. diff --git a/src/Aks/Aks/help/Get-AzAksMaintenanceConfiguration.md b/src/Aks/Aks/help/Get-AzAksMaintenanceConfiguration.md new file mode 100644 index 000000000000..45c5d31238ed --- /dev/null +++ b/src/Aks/Aks/help/Get-AzAksMaintenanceConfiguration.md @@ -0,0 +1,207 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/get-azaksmaintenanceconfiguration +schema: 2.0.0 +--- + +# Get-AzAksMaintenanceConfiguration + +## SYNOPSIS +Gets the specified maintenance configuration of a managed cluster. + +## SYNTAX + +### List (Default) +``` +Get-AzAksMaintenanceConfiguration -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### Get +``` +Get-AzAksMaintenanceConfiguration -ConfigName -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzAksMaintenanceConfiguration -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets the specified maintenance configuration of a managed cluster. + +## EXAMPLES + +### Example 1: List all maintenance configurations for a managed cluster +```powershell +Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster +``` + +```output +Name +---- +aks_maintenance_config1 +aks_maintenance_config2 +``` + +List all maintenance configurations for a managed cluster "myCluster". + +### Example 2: Get a maintenance configuration with its config name +```powershell +Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' +``` + +```output +Name +---- +aks_maintenance_config1 +``` + +Get a maintenance configuration with name "aks_maintenance_config" for a managed cluster "myCluster". + +### Example 3: Get a maintenance configuration via identity +```powershell +$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 +``` + +```output +Name +---- +aks_maintenance_config +``` + +Get a maintenance configuration via identity for a managed cluster "myCluster". + +## PARAMETERS + +### -ConfigName +The name of the maintenance configuration. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: List, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: List, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Get-AzAksManagedClusterCommandResult.md b/src/Aks/Aks/help/Get-AzAksManagedClusterCommandResult.md new file mode 100644 index 000000000000..4637003f68e6 --- /dev/null +++ b/src/Aks/Aks/help/Get-AzAksManagedClusterCommandResult.md @@ -0,0 +1,192 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclustercommandresult +schema: 2.0.0 +--- + +# Get-AzAksManagedClusterCommandResult + +## SYNOPSIS +Gets the results of a command which has been run on the Managed Cluster. + +## SYNTAX + +### Get (Default) +``` +Get-AzAksManagedClusterCommandResult -CommandId -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [] +``` + +### GetViaIdentity +``` +Get-AzAksManagedClusterCommandResult -InputObject [-DefaultProfile ] [-PassThru] + [] +``` + +## DESCRIPTION +Gets the results of a command which has been run on the Managed Cluster. + +## EXAMPLES + +### Example 1: Get the results of a command which has been run on the Managed Cluster. +```powershell +Get-AzAksManagedClusterCommandResult -ResourceGroupName mygroup -ResourceName mycluster -CommandId '706de66629b14267b4962cf015122c12' +``` + +```output +ExitCode : 0 +FinishedAt : 3/31/2023 9:14:40 AM +Id : 706de66629b14267b4962cf015122c12 +Log : NAME STATUS ROLES AGE VERSION + aks-default-40136599-vmss000000 Ready agent 68m v1.24.9 + aks-pool2-22198594-vmss000000 Ready agent 65m v1.24.9 + +ProvisioningState : Succeeded +Reason : +StartedAt : 3/31/2023 9:14:38 AM +``` + +## PARAMETERS + +### -CommandId +Id of the command. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Get-AzAksManagedClusterOSOption.md b/src/Aks/Aks/help/Get-AzAksManagedClusterOSOption.md new file mode 100644 index 000000000000..a8e662e4a349 --- /dev/null +++ b/src/Aks/Aks/help/Get-AzAksManagedClusterOSOption.md @@ -0,0 +1,154 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusterosoption +schema: 2.0.0 +--- + +# Get-AzAksManagedClusterOSOption + +## SYNOPSIS +Gets supported OS options in the specified subscription. + +## SYNTAX + +### Get (Default) +``` +Get-AzAksManagedClusterOSOption -Location [-SubscriptionId ] [-ResourceType ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzAksManagedClusterOSOption -InputObject [-ResourceType ] + [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets supported OS options in the specified subscription. + +## EXAMPLES + +### Example 1: Get supported OS options +```powershell +Get-AzAksManagedClusterOSOption -Location eastus +``` + +```output +Name +---- +default +``` + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -Location +The name of Azure region. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceType +The resource type for which the OS options needs to be returned + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOSOptionProfile + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md b/src/Aks/Aks/help/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md new file mode 100644 index 000000000000..163aec8eb5e1 --- /dev/null +++ b/src/Aks/Aks/help/Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint.md @@ -0,0 +1,121 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/get-azaksmanagedclusteroutboundnetworkdependencyendpoint +schema: 2.0.0 +--- + +# Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint + +## 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. + +## SYNTAX + +``` +Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [] +``` + +## 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. + +## EXAMPLES + +### Example 1: List egress endpoints (network endpoints of all outbound dependencies) in the specified managed cluster +```powershell +$result = Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint -ResourceGroupName mygroup -ResourceName mycluster +$result | select Category,Endpoint +``` + +```output +Category Endpoint +-------- -------- +azure-resource-management {management.azure.com, login.microsoftonline.com} +images {mcr.microsoft.com, *.data.mcr.microsoft.com} +artifacts {packages.microsoft.com, acs-mirror.azureedge.net} +time-sync {ntp.ubuntu.com} +ubuntu-optional {security.ubuntu.com, azure.archive.ubuntu.com, changelogs.ubuntu.com} +apiserver {aks0b1f-idb7vuoi.hcp.eastus.azmk8s.io} +``` + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IOutboundEnvironmentEndpoint + +## NOTES + +ALIASES + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Get-AzAksNodePoolUpgradeProfile.md b/src/Aks/Aks/help/Get-AzAksNodePoolUpgradeProfile.md index 22c0e8dfa4b8..46ada056ce9d 100644 --- a/src/Aks/Aks/help/Get-AzAksNodePoolUpgradeProfile.md +++ b/src/Aks/Aks/help/Get-AzAksNodePoolUpgradeProfile.md @@ -8,27 +8,23 @@ schema: 2.0.0 # Get-AzAksNodePoolUpgradeProfile ## SYNOPSIS -Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. +Gets the upgrade profile for an agent pool. ## SYNTAX ### Get (Default) ``` Get-AzAksNodePoolUpgradeProfile -ClusterName -NodePoolName -ResourceGroupName - [-SubscriptionId ] [-DefaultProfile ] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [] + [-SubscriptionId ] [-DefaultProfile ] [] ``` ### GetViaIdentity ``` -Get-AzAksNodePoolUpgradeProfile -InputObject [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzAksNodePoolUpgradeProfile -InputObject [-DefaultProfile ] [] ``` ## DESCRIPTION -Gets the details of the upgrade profile for an agent pool with a specified resource group and managed cluster name. +Gets the upgrade profile for an agent pool. ## EXAMPLES @@ -47,21 +43,6 @@ Get Aks node pool upgrade profile with resource group name and cluster name. ## PARAMETERS -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ClusterName The name of the managed cluster resource. @@ -78,7 +59,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -92,36 +74,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. @@ -153,53 +105,9 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential -Credentials for a proxy server to use for the remote call - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -214,8 +122,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. +The ID of the target subscription. ```yaml Type: System.String[] @@ -238,7 +145,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IAgentPoolUpgradeProfile +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IAgentPoolUpgradeProfile ## NOTES @@ -251,12 +158,14 @@ To create the parameters described below, construct a hash table containing the `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 a supported Azure region. + - `[Location ]`: The name of Azure region. - `[PrivateEndpointConnectionName ]`: The name of the private endpoint connection. - - `[ResourceGroupName ]`: The name of the resource group. + - `[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 ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/Aks/Aks/help/Get-AzAksSnapshot.md b/src/Aks/Aks/help/Get-AzAksSnapshot.md new file mode 100644 index 000000000000..fba42d045741 --- /dev/null +++ b/src/Aks/Aks/help/Get-AzAksSnapshot.md @@ -0,0 +1,203 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/get-azakssnapshot +schema: 2.0.0 +--- + +# Get-AzAksSnapshot + +## SYNOPSIS +Gets a snapshot. + +## SYNTAX + +### List (Default) +``` +Get-AzAksSnapshot [-SubscriptionId ] [-DefaultProfile ] [] +``` + +### List1 +``` +Get-AzAksSnapshot -ResourceGroupName [-SubscriptionId ] [-DefaultProfile ] + [] +``` + +### Get +``` +Get-AzAksSnapshot -ResourceGroupName -ResourceName [-SubscriptionId ] + [-DefaultProfile ] [] +``` + +### GetViaIdentity +``` +Get-AzAksSnapshot -InputObject [-DefaultProfile ] [] +``` + +## DESCRIPTION +Gets a snapshot. + +## EXAMPLES + +### Example 1: List all AKS snapshots +```powershell +Get-AzAksSnapshot +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +eastus snapshot2 3/30/2023 10:09:38 AM user1@microsoft.com User 3/30/2023 10:09:38 AM user1@microsoft.com User +eastus snapshot3 3/30/2023 10:11:24 AM user1@microsoft.com User 3/30/2023 10:11:24 AM user1@microsoft.com User +``` + +### Example 2: List all AKS snapshots in a resource group +```powershell +Get-AzAksSnapshot -ResourceGroupName mygroup +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +eastus snapshot2 3/30/2023 10:09:38 AM user1@microsoft.com User 3/30/2023 10:09:38 AM user1@microsoft.com User +``` + +### Example 3: Get an AKS snapshot +```powershell +Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +``` + +### Example 4: Get an AKS snapshot via identity +```powershell +$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 +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:09:35 AM user1@microsoft.com User 3/30/2023 10:09:35 AM user1@microsoft.com User +``` + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: GetViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: List1, Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Get +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String[] +Parameter Sets: List, List1, Get +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Get-AzAksUpgradeProfile.md b/src/Aks/Aks/help/Get-AzAksUpgradeProfile.md index 15346015458b..0cd930d96bd8 100644 --- a/src/Aks/Aks/help/Get-AzAksUpgradeProfile.md +++ b/src/Aks/Aks/help/Get-AzAksUpgradeProfile.md @@ -8,27 +8,23 @@ schema: 2.0.0 # Get-AzAksUpgradeProfile ## SYNOPSIS -Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. +Gets the upgrade profile of a managed cluster. ## SYNTAX ### Get (Default) ``` Get-AzAksUpgradeProfile -ClusterName -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-Proxy ] [-ProxyCredential ] - [-ProxyUseDefaultCredentials] [] + [-DefaultProfile ] [] ``` ### GetViaIdentity ``` -Get-AzAksUpgradeProfile -InputObject [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzAksUpgradeProfile -InputObject [-DefaultProfile ] [] ``` ## DESCRIPTION -Gets the details of the upgrade profile for a managed cluster with a specified resource group and name. +Gets the upgrade profile of a managed cluster. ## EXAMPLES @@ -47,21 +43,6 @@ Get Aks upgrade profile with resource group name and cluster name. ## PARAMETERS -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ClusterName The name of the managed cluster resource. @@ -78,7 +59,8 @@ Accept wildcard characters: False ``` ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -92,36 +74,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. @@ -138,53 +90,9 @@ Accept pipeline input: True (ByValue) Accept wildcard characters: False ``` -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential -Credentials for a proxy server to use for the remote call - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -199,8 +107,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. +The ID of the target subscription. ```yaml Type: System.String[] @@ -223,7 +130,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS -### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20200901.IManagedClusterUpgradeProfile +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IManagedClusterUpgradeProfile ## NOTES @@ -238,12 +145,14 @@ To create the parameters described below, construct a hash table containing the `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 a supported Azure region. + - `[Location ]`: The name of Azure region. - `[PrivateEndpointConnectionName ]`: The name of the private endpoint connection. - - `[ResourceGroupName ]`: The name of the resource group. + - `[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 ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/Aks/Aks/help/Get-AzAksVersion.md b/src/Aks/Aks/help/Get-AzAksVersion.md index 06809f5bf517..3174720063dd 100644 --- a/src/Aks/Aks/help/Get-AzAksVersion.md +++ b/src/Aks/Aks/help/Get-AzAksVersion.md @@ -14,9 +14,8 @@ The operation returns properties of each orchestrator including version, availab ## SYNTAX ``` -Get-AzAksVersion -Location [-SubscriptionId ] [-DefaultProfile ] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [] +Get-AzAksVersion -Location [-SubscriptionId ] [-DefaultProfile ] + [] ``` ## DESCRIPTION @@ -25,7 +24,7 @@ The operation returns properties of each orchestrator including version, availab ## EXAMPLES -### Example 1: List available version for creating managed Kubernetes cluster. +### Example 1: List available version for creating managed Kubernetes cluster ```powershell Get-AzAksVersion -location eastus ``` @@ -47,21 +46,6 @@ List available version for creating managed Kubernetes cluster. ## PARAMETERS -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -DefaultProfile The credentials, account, tenant, and subscription used for communication with Azure. @@ -77,36 +61,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -Location The name of a supported Azure region. @@ -122,51 +76,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential -Credentials for a proxy server to use for the remote call - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -SubscriptionId Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. diff --git a/src/Aks/Aks/help/Invoke-AzAksAbortAgentPoolLatestOperation.md b/src/Aks/Aks/help/Invoke-AzAksAbortAgentPoolLatestOperation.md new file mode 100644 index 000000000000..5920f074ad65 --- /dev/null +++ b/src/Aks/Aks/help/Invoke-AzAksAbortAgentPoolLatestOperation.md @@ -0,0 +1,249 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortagentpoollatestoperation +schema: 2.0.0 +--- + +# Invoke-AzAksAbortAgentPoolLatestOperation + +## 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. + +## SYNTAX + +### Abort (Default) +``` +Invoke-AzAksAbortAgentPoolLatestOperation -AgentPoolName -ResourceGroupName + -ResourceName [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-WhatIf] [-Confirm] [] +``` + +### AbortViaIdentity +``` +Invoke-AzAksAbortAgentPoolLatestOperation -InputObject [-DefaultProfile ] [-AsJob] + [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] +``` + +## 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. + +## EXAMPLES + +### Example 1: Abort the currently running operation on the agent pool +```powershell +Invoke-AzAksAbortAgentPoolLatestOperation -ResourceGroupName mygroup -ResourceName mycluster -AgentPoolName 'pool1' +``` + +Abort the currently running operation on the agent pool "pool1". +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. + +## PARAMETERS + +### -AgentPoolName +The name of the agent pool. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: AbortViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Invoke-AzAksAbortManagedClusterLatestOperation.md b/src/Aks/Aks/help/Invoke-AzAksAbortManagedClusterLatestOperation.md new file mode 100644 index 000000000000..32abea96747d --- /dev/null +++ b/src/Aks/Aks/help/Invoke-AzAksAbortManagedClusterLatestOperation.md @@ -0,0 +1,234 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksabortmanagedclusterlatestoperation +schema: 2.0.0 +--- + +# Invoke-AzAksAbortManagedClusterLatestOperation + +## 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. + +## SYNTAX + +### Abort (Default) +``` +Invoke-AzAksAbortManagedClusterLatestOperation -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] + [] +``` + +### AbortViaIdentity +``` +Invoke-AzAksAbortManagedClusterLatestOperation -InputObject [-DefaultProfile ] + [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] +``` + +## 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. + +## EXAMPLES + +### Example 1: Abort the currently running operation on the managed cluster. +```powershell +Invoke-AzAksAbortManagedClusterLatestOperation -ResourceGroupName mygroup -ResourceName mycluster +``` + +Abort the currently running operation on the managed cluster "mycluster". +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. + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: AbortViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Abort +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md b/src/Aks/Aks/help/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md new file mode 100644 index 000000000000..b271aa9b937a --- /dev/null +++ b/src/Aks/Aks/help/Invoke-AzAksRotateManagedClusterServiceAccountSigningKey.md @@ -0,0 +1,226 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/invoke-azaksrotatemanagedclusterserviceaccountsigningkey +schema: 2.0.0 +--- + +# Invoke-AzAksRotateManagedClusterServiceAccountSigningKey + +## SYNOPSIS +Rotates the service account signing keys of a managed cluster. + +## SYNTAX + +### Rotate (Default) +``` +Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] + [] +``` + +### RotateViaIdentity +``` +Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -InputObject + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Rotates the service account signing keys of a managed cluster. + +## EXAMPLES + +### Example 1: Rotates the service account signing keys of a managed cluster +```powershell +Invoke-AzAksRotateManagedClusterServiceAccountSigningKey -ResourceGroupName mygroup -ResourceName mycluster +``` + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: RotateViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Rotate +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Rotate +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Rotate +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/New-AzAksMaintenanceConfiguration.md b/src/Aks/Aks/help/New-AzAksMaintenanceConfiguration.md new file mode 100644 index 000000000000..1ce5e7f81e7c --- /dev/null +++ b/src/Aks/Aks/help/New-AzAksMaintenanceConfiguration.md @@ -0,0 +1,209 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/new-azaksmaintenanceconfiguration +schema: 2.0.0 +--- + +# New-AzAksMaintenanceConfiguration + +## SYNOPSIS +Creates or updates a maintenance configuration in the specified managed cluster. + +## SYNTAX + +``` +New-AzAksMaintenanceConfiguration -ConfigName -ResourceGroupName -ResourceName + [-SubscriptionId ] [-NotAllowedTime ] [-TimeInWeek ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Creates or updates a maintenance configuration in the specified managed cluster. + +## EXAMPLES + +### Example 1: Creates or updates a maintenance configuration in the specified managed cluster +```powershell +$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 +``` + +```output +Name +---- +aks_maintenance_config +``` + +Create a maintenance configuration "aks_maintenance_config" in a managed cluster "myCluster" with a time in week and a not allowed time span. + +## PARAMETERS + +### -ConfigName +The name of the maintenance configuration. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -NotAllowedTime +Time slots on which upgrade is not allowed. +To construct, see NOTES section for NOTALLOWEDTIME properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeSpan[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -TimeInWeek +If two array entries specify the same day of the week, the applied configuration is the union of times in both entries. +To construct, see NOTES section for TIMEINWEEK properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ITimeInWeek[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IMaintenanceConfiguration + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/New-AzAksSnapshot.md b/src/Aks/Aks/help/New-AzAksSnapshot.md new file mode 100644 index 000000000000..b11a0880b080 --- /dev/null +++ b/src/Aks/Aks/help/New-AzAksSnapshot.md @@ -0,0 +1,209 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/new-azakssnapshot +schema: 2.0.0 +--- + +# New-AzAksSnapshot + +## SYNOPSIS +Creates or updates a snapshot. + +## SYNTAX + +``` +New-AzAksSnapshot -ResourceGroupName -ResourceName [-SubscriptionId ] + -Location [-CreationDataSourceResourceId ] [-SnapshotType ] [-Tag ] + [-DefaultProfile ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Creates or updates a snapshot. + +## EXAMPLES + +### Example 1: Creates or updates a snapshot +```powershell +$pool = Get-AzAksNodePool -ResourceGroupName mygroup -ClusterName mycluster -Name default +New-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' -Location eastus -SnapshotType 'NodePool' -CreationDataSourceResourceId $pool.Id +``` + +```output +Location Name SystemDataCreatedAt SystemDataCreatedBy SystemDataCreatedByType SystemDataLastModifiedAt SystemDataLastModifiedBy SystemDataLastModifiedByType +-------- ---- ------------------- ------------------- ----------------------- ------------------------ ------------------------ ---------------------------- +eastus snapshot1 3/30/2023 10:24:43 AM user1@microsoft.com User 3/30/2023 10:24:43 AM user1@microsoft.com User +``` + +Creates or updates a snapshot for a nodepool "default" of a managed cluster "mycluster". + +## PARAMETERS + +### -CreationDataSourceResourceId +This is the ARM ID of the source object to be used to create the target object. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Location +The geo-location where the resource lives + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SnapshotType +The type of a snapshot. +The default is NodePool. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.SnapshotType +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Tag +Resource tags. + +```yaml +Type: System.Collections.Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.ISnapshot + +## NOTES + +ALIASES + +## RELATED LINKS diff --git a/src/Aks/Aks/help/New-AzAksTimeInWeekObject.md b/src/Aks/Aks/help/New-AzAksTimeInWeekObject.md new file mode 100644 index 000000000000..c27aae65b665 --- /dev/null +++ b/src/Aks/Aks/help/New-AzAksTimeInWeekObject.md @@ -0,0 +1,86 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeInWeekObject +schema: 2.0.0 +--- + +# New-AzAksTimeInWeekObject + +## SYNOPSIS +Create an in-memory object for TimeInWeek. + +## SYNTAX + +``` +New-AzAksTimeInWeekObject [-Day ] [-HourSlot ] [] +``` + +## DESCRIPTION +Create an in-memory object for TimeInWeek. + +## EXAMPLES + +### Example 1: Create an in-memory object for time in a week +```powershell +New-AzAksTimeInWeekObject -Day 'Sunday' -HourSlot 1,2 +``` + +```output +Day HourSlot +--- -------- +Sunday {1, 2} +``` + +*New-AzAksTimeInWeekObject* creates an in-memory object of type *TimeInWeek*. +This object represents time in a week. +and will be used for parameter *TimeInWeek* in cmdlet *New-AzAksMaintenanceConfiguration*. + +## PARAMETERS + +### -Day +The day of the week. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Support.WeekDay +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -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. + +```yaml +Type: System.Int32[] +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeInWeek + +## NOTES + +ALIASES + +## RELATED LINKS diff --git a/src/Aks/Aks/help/New-AzAksTimeSpanObject.md b/src/Aks/Aks/help/New-AzAksTimeSpanObject.md new file mode 100644 index 000000000000..76a171554dfc --- /dev/null +++ b/src/Aks/Aks/help/New-AzAksTimeSpanObject.md @@ -0,0 +1,85 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/Az.Aks/new-AzAksTimeSpanObject +schema: 2.0.0 +--- + +# New-AzAksTimeSpanObject + +## SYNOPSIS +Create an in-memory object for TimeSpan. + +## SYNTAX + +``` +New-AzAksTimeSpanObject [-End ] [-Start ] [] +``` + +## DESCRIPTION +Create an in-memory object for TimeSpan. + +## EXAMPLES + +### Example 1: Create Create an in-memory object for a time span +```powershell +$startDate = Get-Date -Year 2023 -Month 3 -Day 1 +$endDate = Get-Date -Year 2023 -Month 3 -Day 2 +New-AzAksTimeSpanObject -Start $startDate -End $endDate +``` + +```output +End Start +--- ----- +3/2/2023 1:53:53 PM 3/1/2023 1:53:45 PM +``` + +*New-AzAksTimeSpanObject* creates an in-memory object of type *TimeSpan*. +This object represents a time span and will be used for parameter *NotAllowedTime* in cmdlet *New-AzAksMaintenanceConfiguration*. + +## PARAMETERS + +### -End +The end of a time span. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Start +The start of a time span. + +```yaml +Type: System.DateTime +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.TimeSpan + +## NOTES + +ALIASES + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Remove-AzAksMaintenanceConfiguration.md b/src/Aks/Aks/help/Remove-AzAksMaintenanceConfiguration.md new file mode 100644 index 000000000000..d0eececd9131 --- /dev/null +++ b/src/Aks/Aks/help/Remove-AzAksMaintenanceConfiguration.md @@ -0,0 +1,216 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/remove-azaksmaintenanceconfiguration +schema: 2.0.0 +--- + +# Remove-AzAksMaintenanceConfiguration + +## SYNOPSIS +Deletes a maintenance configuration. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzAksMaintenanceConfiguration -ConfigName -ResourceGroupName -ResourceName + [-SubscriptionId ] [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentity +``` +Remove-AzAksMaintenanceConfiguration -InputObject [-DefaultProfile ] [-PassThru] + [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Deletes a maintenance configuration. + +## EXAMPLES + +### Example 1: Remove a maintenance configuration +```powershell +Remove-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName mycluster -ConfigName 'aks_maintenance_config' +``` + +### Example 2: Remove a maintenance configuration via identity +```powershell +$MaintenanceConfig = Get-AzAksMaintenanceConfiguration -ResourceGroupName mygroup -ResourceName myCluster -ConfigName 'aks_maintenance_config' +$MaintenanceConfig | Remove-AzAksMaintenanceConfiguration +``` + +## PARAMETERS + +### -ConfigName +The name of the maintenance configuration. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Remove-AzAksSnapshot.md b/src/Aks/Aks/help/Remove-AzAksSnapshot.md new file mode 100644 index 000000000000..50f8198d3bcb --- /dev/null +++ b/src/Aks/Aks/help/Remove-AzAksSnapshot.md @@ -0,0 +1,201 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/remove-azakssnapshot +schema: 2.0.0 +--- + +# Remove-AzAksSnapshot + +## SYNOPSIS +Deletes a snapshot. + +## SYNTAX + +### Delete (Default) +``` +Remove-AzAksSnapshot -ResourceGroupName -ResourceName [-SubscriptionId ] + [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] [] +``` + +### DeleteViaIdentity +``` +Remove-AzAksSnapshot -InputObject [-DefaultProfile ] [-PassThru] [-WhatIf] [-Confirm] + [] +``` + +## DESCRIPTION +Deletes a snapshot. + +## EXAMPLES + +### Example 1: Remove an AKS snapshot +```powershell +Remove-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +``` + +### Example 2: Remove an AKS snapshot via identity +```powershell +$Snapshot = Get-AzAksSnapshot -ResourceGroupName mygroup -ResourceName 'snapshot1' +$Snapshot | Remove-AzAksSnapshot +``` + +## PARAMETERS + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: DeleteViaIdentity +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -PassThru +Returns true when the command succeeds + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: Delete +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### System.Boolean + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Start-AzAksCluster.md b/src/Aks/Aks/help/Start-AzAksCluster.md index cad6bba9341b..ba5c53ddc5b2 100644 --- a/src/Aks/Aks/help/Start-AzAksCluster.md +++ b/src/Aks/Aks/help/Start-AzAksCluster.md @@ -8,28 +8,24 @@ schema: 2.0.0 # Start-AzAksCluster ## SYNOPSIS -Starts a Stopped Managed Cluster +See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. ## SYNTAX ### Start (Default) ``` Start-AzAksCluster -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-PassThru] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] ``` ### StartViaIdentity ``` -Start-AzAksCluster -InputObject [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-PassThru] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] +Start-AzAksCluster -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Starts a Stopped Managed Cluster +See [starting a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about starting a cluster. ## EXAMPLES @@ -64,23 +60,9 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -94,36 +76,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. @@ -185,53 +137,9 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential -Credentials for a proxy server to use for the remote call - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -246,8 +154,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. +The ID of the target subscription. ```yaml Type: System.String @@ -314,12 +221,14 @@ To create the parameters described below, construct a hash table containing the `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 a supported Azure region. + - `[Location ]`: The name of Azure region. - `[PrivateEndpointConnectionName ]`: The name of the private endpoint connection. - - `[ResourceGroupName ]`: The name of the resource group. + - `[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 ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS diff --git a/src/Aks/Aks/help/Start-AzAksManagedClusterCommand.md b/src/Aks/Aks/help/Start-AzAksManagedClusterCommand.md new file mode 100644 index 000000000000..81032a1d8b2b --- /dev/null +++ b/src/Aks/Aks/help/Start-AzAksManagedClusterCommand.md @@ -0,0 +1,295 @@ +--- +external help file: Az.Aks-help.xml +Module Name: Az.Aks +online version: https://learn.microsoft.com/powershell/module/az.aks/start-azaksmanagedclustercommand +schema: 2.0.0 +--- + +# Start-AzAksManagedClusterCommand + +## SYNOPSIS +AKS will create a pod to run the command. +This is primarily useful for private clusters. +For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + +## SYNTAX + +### RunExpanded (Default) +``` +Start-AzAksManagedClusterCommand -ResourceGroupName -ResourceName [-SubscriptionId ] + -Command [-ClusterToken ] [-Context ] [-DefaultProfile ] [-AsJob] [-NoWait] + [-WhatIf] [-Confirm] [] +``` + +### RunViaIdentityExpanded +``` +Start-AzAksManagedClusterCommand -InputObject -Command [-ClusterToken ] + [-Context ] [-DefaultProfile ] [-AsJob] [-NoWait] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +AKS will create a pod to run the command. +This is primarily useful for private clusters. +For more information see [AKS Run Command](https://docs.microsoft.com/azure/aks/private-clusters#aks-run-command-preview). + +## EXAMPLES + +### Example 1: Run AKS command +```powershell +Start-AzAksManagedClusterCommand -ResourceGroupName mygroup -ResourceName mycluster -Command "kubectl get nodes" +``` + +```output +ExitCode : 0 +FinishedAt : 3/31/2023 8:52:17 AM +Id : 0a3991475d9744fcbfdc2595b40e517f +Log : NAME STATUS ROLES AGE VERSION + aks-default-40136599-vmss000000 Ready agent 46m v1.24.9 + aks-pool2-22198594-vmss000000 Ready agent 43m v1.24.9 + +ProvisioningState : Succeeded +Reason : +StartedAt : 3/31/2023 8:52:16 AM +``` + +AKS will create a pod to run the command. +This is primarily useful for private clusters. + +### Example 2: Run AKS command via identity +```powershell +$cluster = Get-AzAksCluster -ResourceGroupName mygroup -Name mycluster +$cluster | Start-AzAksManagedClusterCommand -Command "kubectl get nodes" +``` + +```output +ExitCode : 0 +FinishedAt : 3/31/2023 8:54:17 AM +Id : 0a3991475d9744fcbfdc2595b40e517f +Log : NAME STATUS ROLES AGE VERSION + aks-default-40136599-vmss000000 Ready agent 46m v1.24.9 + aks-pool2-22198594-vmss000000 Ready agent 43m v1.24.9 + +ProvisioningState : Succeeded +Reason : +StartedAt : 3/31/2023 8:54:16 AM +``` + +## PARAMETERS + +### -AsJob +Run the command as a job + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ClusterToken +AuthToken issued for AKS AAD Server App. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Command +The command to run. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Context +A base64 encoded zip file containing the files required by the command. + +```yaml +Type: System.String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -DefaultProfile +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. + +```yaml +Type: System.Management.Automation.PSObject +Parameter Sets: (All) +Aliases: AzureRMContext, AzureCredential + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -InputObject +Identity Parameter +To construct, see NOTES section for INPUTOBJECT properties and create a hash table. + +```yaml +Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity +Parameter Sets: RunViaIdentityExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -NoWait +Run the command asynchronously + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceGroupName +The name of the resource group. +The name is case insensitive. + +```yaml +Type: System.String +Parameter Sets: RunExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -ResourceName +The name of the managed cluster resource. + +```yaml +Type: System.String +Parameter Sets: RunExpanded +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -SubscriptionId +The ID of the target subscription. + +```yaml +Type: System.String +Parameter Sets: RunExpanded +Aliases: + +Required: False +Position: Named +Default value: (Get-AzContext).Subscription.Id +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: System.Management.Automation.SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.IAksIdentity + +## OUTPUTS + +### Microsoft.Azure.PowerShell.Cmdlets.Aks.Models.Api20230201.IRunCommandResult + +## NOTES + +ALIASES + +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. + +## RELATED LINKS diff --git a/src/Aks/Aks/help/Stop-AzAksCluster.md b/src/Aks/Aks/help/Stop-AzAksCluster.md index 1e61fe2ad2c5..c56dc4637ac8 100644 --- a/src/Aks/Aks/help/Stop-AzAksCluster.md +++ b/src/Aks/Aks/help/Stop-AzAksCluster.md @@ -8,28 +8,30 @@ schema: 2.0.0 # Stop-AzAksCluster ## SYNOPSIS -Stops a Running Managed Cluster +This can only be performed on Azure Virtual Machine Scale set backed clusters. +Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. +A cluster does not accrue charges while it is stopped. +See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. ## SYNTAX ### Stop (Default) ``` Stop-AzAksCluster -Name -ResourceGroupName [-SubscriptionId ] - [-DefaultProfile ] [-AsJob] [-Break] [-HttpPipelineAppend ] - [-HttpPipelinePrepend ] [-NoWait] [-PassThru] [-Proxy ] - [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] [] + [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] [-WhatIf] [-Confirm] [] ``` ### StopViaIdentity ``` -Stop-AzAksCluster -InputObject [-DefaultProfile ] [-AsJob] [-Break] - [-HttpPipelineAppend ] [-HttpPipelinePrepend ] [-NoWait] [-PassThru] - [-Proxy ] [-ProxyCredential ] [-ProxyUseDefaultCredentials] [-WhatIf] [-Confirm] - [] +Stop-AzAksCluster -InputObject [-DefaultProfile ] [-AsJob] [-NoWait] [-PassThru] + [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION -Stops a Running Managed Cluster +This can only be performed on Azure Virtual Machine Scale set backed clusters. +Stopping a cluster stops the control plane and agent nodes entirely, while maintaining all object and cluster state. +A cluster does not accrue charges while it is stopped. +See [stopping a cluster](https://docs.microsoft.com/azure/aks/start-stop-cluster) for more details about stopping a cluster. ## EXAMPLES @@ -64,23 +66,9 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Break -Wait for .NET debugger to attach - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -DefaultProfile -The credentials, account, tenant, and subscription used for communication with Azure. +The DefaultProfile parameter is not functional. +Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription. ```yaml Type: System.Management.Automation.PSObject @@ -94,36 +82,6 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -HttpPipelineAppend -SendAsync Pipeline Steps to be appended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -HttpPipelinePrepend -SendAsync Pipeline Steps to be prepended to the front of the pipeline - -```yaml -Type: Microsoft.Azure.PowerShell.Cmdlets.Aks.Runtime.SendAsyncStep[] -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -InputObject Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table. @@ -185,53 +143,9 @@ Accept pipeline input: False Accept wildcard characters: False ``` -### -Proxy -The URI for the proxy server to use - -```yaml -Type: System.Uri -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyCredential -Credentials for a proxy server to use for the remote call - -```yaml -Type: System.Management.Automation.PSCredential -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` - -### -ProxyUseDefaultCredentials -Use the default credentials for the proxy - -```yaml -Type: System.Management.Automation.SwitchParameter -Parameter Sets: (All) -Aliases: - -Required: False -Position: Named -Default value: False -Accept pipeline input: False -Accept wildcard characters: False -``` - ### -ResourceGroupName The name of the resource group. +The name is case insensitive. ```yaml Type: System.String @@ -246,8 +160,7 @@ Accept wildcard characters: False ``` ### -SubscriptionId -Subscription credentials which uniquely identify Microsoft Azure subscription. -The subscription ID forms part of the URI for every service call. +The ID of the target subscription. ```yaml Type: System.String @@ -314,12 +227,14 @@ To create the parameters described below, construct a hash table containing the `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 a supported Azure region. + - `[Location ]`: The name of Azure region. - `[PrivateEndpointConnectionName ]`: The name of the private endpoint connection. - - `[ResourceGroupName ]`: The name of the resource group. + - `[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 ]`: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. + - `[SubscriptionId ]`: The ID of the target subscription. ## RELATED LINKS From cd03c5590af823bba9379ae65a3ad6cb9814af5a Mon Sep 17 00:00:00 2001 From: YanaXu Date: Wed, 12 Apr 2023 15:56:42 +0800 Subject: [PATCH 2/2] update changelog and suppress signature issues --- src/Aks/Aks/ChangeLog.md | 1 + .../Exceptions/Az.Aks/SignatureIssues.csv | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/src/Aks/Aks/ChangeLog.md b/src/Aks/Aks/ChangeLog.md index 30489a6dfb7d..6ff47fe046fc 100644 --- a/src/Aks/Aks/ChangeLog.md +++ b/src/Aks/Aks/ChangeLog.md @@ -18,6 +18,7 @@ - Additional information about change #1 --> ## Upcoming Release +* Added cmdlet `New-AzAksMaintenanceConfiguration`, `Get-AzAksMaintenanceConfiguration`, `Remove-AzAksMaintenanceConfiguration`, `New-AzAksSnapshot`, `Get-AzAksSnapshot`, `Remove-AzAksSnapshot`, `Get-AzAksManagedClusterCommandResult`, `Get-AzAksManagedClusterOSOption`, `Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint`, `Invoke-AzAksAbortAgentPoolLatestOperation`, `Invoke-AzAksAbortManagedClusterLatestOperation`, `Invoke-AzAksRotateManagedClusterServiceAccountSigningKey`, `Start-AzAksManagedClusterCommand`, `New-AzAksTimeInWeekObject`, `New-AzAksTimeSpanObject`. * Added parameter `-OutboundType` for `New-AzAksCluster` * Added parameter `-EnableOidcIssuer` for `New-AzAksCluster` and `Set-AzAksCluster` * Added parameter `-NodePodSubnetID` for `New-AzAksCluster`, `-PodSubnetID` for `New-AzAksNodePool` diff --git a/tools/StaticAnalysis/Exceptions/Az.Aks/SignatureIssues.csv b/tools/StaticAnalysis/Exceptions/Az.Aks/SignatureIssues.csv index 9373d46e5cda..639a7fd11f6f 100644 --- a/tools/StaticAnalysis/Exceptions/Az.Aks/SignatureIssues.csv +++ b/tools/StaticAnalysis/Exceptions/Az.Aks/SignatureIssues.csv @@ -12,3 +12,19 @@ "Az.Aks","Get-AzAksUpgradeProfile","Get-AzAksUpgradeProfile","2","8200","Get-AzAksUpgradeProfile changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact." "Az.Aks","Get-AzAksVersion","Get-AzAksVersion","2","8010","Get-AzAksVersion Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" "Az.Aks","Get-AzAksVersion","Get-AzAksVersion","2","8200","Get-AzAksVersion changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact." +"Az.Aks","Get-AzAksMaintenanceConfiguration","Get-AzAksMaintenanceConfiguration","2","8010","Get-AzAksMaintenanceConfiguration Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" +"Az.Aks","Get-AzAksMaintenanceConfiguration","Get-AzAksMaintenanceConfiguration","2","8200","Get-AzAksMaintenanceConfiguration changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact." +"Az.Aks","Get-AzAksManagedClusterCommandResult","Get-AzAksManagedClusterCommandResult","2","8010","Get-AzAksManagedClusterCommandResult Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" +"Az.Aks","Get-AzAksManagedClusterCommandResult","Get-AzAksManagedClusterCommandResult","2","8200","Get-AzAksManagedClusterCommandResult changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact." +"Az.Aks","Get-AzAksManagedClusterOSOption","Get-AzAksManagedClusterOSOption","2","8010","Get-AzAksManagedClusterOSOption Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" +"Az.Aks","Get-AzAksManagedClusterOSOption","Get-AzAksManagedClusterOSOption","2","8200","Get-AzAksManagedClusterOSOption changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact." +"Az.Aks","Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint","Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint","2","8010","Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" +"Az.Aks","Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint","Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint","2","8200","Get-AzAksManagedClusterOutboundNetworkDependencyEndpoint changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact." +"Az.Aks","Get-AzAksSnapshot","Get-AzAksSnapshot","2","8010","Get-AzAksSnapshot Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" +"Az.Aks","Get-AzAksSnapshot","Get-AzAksSnapshot","2","8200","Get-AzAksSnapshot changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact." +"Az.Aks","New-AzAksTimeInWeekObject","New-AzAksTimeInWeekObject","2","8010","New-AzAksTimeInWeekObject Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" +"Az.Aks","New-AzAksTimeInWeekObject","New-AzAksTimeInWeekObject","1","8100","New-AzAksTimeInWeekObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" +"Az.Aks","New-AzAksTimeInWeekObject","New-AzAksTimeInWeekObject","2","8200","New-AzAksTimeInWeekObject changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact." +"Az.Aks","New-AzAksTimeSpanObject","New-AzAksTimeSpanObject","2","8010","New-AzAksTimeSpanObject Changes the ConfirmImpact but does not set the SupportsShouldProcess property to true in the cmdlet attribute.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" +"Az.Aks","New-AzAksTimeSpanObject","New-AzAksTimeSpanObject","1","8100","New-AzAksTimeSpanObject Does not support ShouldProcess but the cmdlet verb New indicates that it should.","Determine if the cmdlet should implement ShouldProcess and if so determine if it should implement Force / ShouldContinue" +"Az.Aks","New-AzAksTimeSpanObject","New-AzAksTimeSpanObject","2","8200","New-AzAksTimeSpanObject changes the confirm impact. Please ensure that the change in ConfirmImpact is justified","Verify that ConfirmImpact is changed appropriately by the cmdlet. It is very rare for a cmdlet to change the ConfirmImpact."