Closed
Description
Description
In latest update API version is updated to 20210301
- $(repo)/specification/compute/resource-manager/Microsoft.Compute/stable/2021-03-01/cloudService.json
But frontendIPConfiguration transformation is still referencing older API version Api20201001Preview.
- from: source-file-csharp
where: $
transform: $ = $.replace('{_frontendIPConfiguration = If( json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.Json.JsonArray>("frontendIPConfigurations"), out var __jsonFrontendIPConfigurations) ? If( __jsonFrontendIPConfigurations as Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.Json.JsonArray, out var __v) ? new global::System.Func<Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.ILoadBalancerFrontendIPConfiguration[]>(()=> global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(__v, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.ILoadBalancerFrontendIPConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.LoadBalancerFrontendIPConfiguration.FromJson(__u) )) ))() :' + ' null' + ' :' + ' FrontendIPConfiguration;}', 'var frontendIpConfigurationJsonArray = json?.PropertyT<Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.Json.JsonArray>("frontendIpConfigurations") as Microsoft.Azure.PowerShell.Cmdlets.CloudService.Runtime.Json.JsonArray;\n\t\t\t_frontendIPConfiguration = global::System.Linq.Enumerable.ToArray(global::System.Linq.Enumerable.Select(frontendIpConfigurationJsonArray, (__u)=>(Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.ILoadBalancerFrontendIPConfiguration) (Microsoft.Azure.PowerShell.Cmdlets.CloudService.Models.Api20201001Preview.LoadBalancerFrontendIPConfiguration.FromJson(__u) )));');
- from: source-file-csharp
where: $
transform: $ = $.replace('if ((first == \'{\' && last == \'}\') || (first == \'<\' && last == \'>\') || (first == \'[\' && last == \']\') || (first == \'"\' && last == \'"\'))\n {','')
- from: source-file-csharp
where: $
transform: $ = $.replace(' }\n\n // base64 for everyone else\n return new JsonString(System.Convert.ToBase64String(content));','')
- from: source-file-csharp
where: $
transform: $ = $.replace('if (content.EndsWith("=="))','if (!(content.Contains("{") || content.Contains("[")))')
Steps to reproduce
PS E:\git\PowerShell\simpleTest> $cs = Get-AzCloudService -ResourceGroupName mytestrg -Name mytestcloudservice
PS E:\git\PowerShell\simpleTest> $cs.NetworkProfile.LoadBalancerConfiguration | fl
FrontendIPConfiguration :
Id :
Name : mytestlb
Environment data
Module versions
PS E:\git\PowerShell\simpleTest> Get-InstalledModule -Name Az.CloudService
Version Name Repository Description
------- ---- ---------- -----------
0.2.0 Az.CloudService PSGallery Microsoft Azure PowerShell: CloudService cmdlets
Debug output
Error output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment