Description of the new feature
It seems the apiServerAccessProfile returned by az aks show isn't in the output for Get-AzAks, is this correct?
From az aks show as an example
{
…
"apiServerAccessProfile": {
"authorizedIpRanges": [
"123.123.123.123/32"
],
…
}
Using -Debug shows this key isn't coming back on the Get-AzAks call, whereas it does for the generic resource call.
Further to this by doing a generic Get-AzResource the profile is available in the -Debug output.
"apiServerAccessProfile": {
"enablePrivateCluster": false
}
Further to that it can be accessed by using -ExpandProperties and then querying the Property object on the resource.
(Get-AzResource -ResourceType Microsoft.ContainerServic
e/ManagedClusters -ResourceGroupName sonovate-euw-dev-base-compute-rg -Name sonovate-euw-dev
-base-compute-ks -ExpandProperties).Properties.apiServerAccessProfile
enablePrivateCluster
--------------------
False
EDIT: After more digging it seems the Get-AzAks uses an API version that's 3 years old, whereas Get-AzResource uses one from 2020:
Get-AzAks:
https://management.azure.com/subscriptions/sub-id/resourceGroups/group-name/providers/Microsoft.ContainerService/managedClusters/resourse-name?api-version=2017-08-31
vs Get-AzResource:
https://management.azure.com//subscriptions/sub-id/resourceGroups/group-name/providers/Microsoft.ContainerService/ManagedClusters/resource-name?api-version=2020-03-01
Description of the new feature
It seems the
apiServerAccessProfilereturned byaz aks showisn't in the output forGet-AzAks, is this correct?From
az aks showas an exampleUsing
-Debugshows this key isn't coming back on theGet-AzAkscall, whereas it does for the generic resource call.Further to this by doing a generic
Get-AzResourcethe profile is available in the-Debugoutput.Further to that it can be accessed by using
-ExpandPropertiesand then querying thePropertyobject on the resource.EDIT: After more digging it seems the
Get-AzAksuses an API version that's 3 years old, whereasGet-AzResourceuses one from 2020:Get-AzAks:vs
Get-AzResource: