[BUG] IGenericResource.ApiVersion is always null
See original GitHub issueDescribe the bug
When retrieving an IGenericResource
instance from genericResources.ListByResourceGroupAsync
ApiVersion
property is null.
To Reproduce
The resource already exists and when showing ARM template in Azure ApiVersion
is filled.
var resources = await genericResources.ListByResourceGroupAsync(Config.ResourceGroup);
foreach (var resource in resources)
{
// resource.ApiVersion is always null
await resource.Update().WithApiVersion(resource.ApiVersion).WithTags(new DefaultTags()).ApplyAsync();
}
Expected behavior
IGenericResource.ApiVersion
should be filled with the correct ApiVersion
that was used when the resource was created or updated.
Setup (please complete the following information):
- Microsoft.Azure.Management.Fluent 1.31.0
- Microsoft.Azure.Management.ResourceManager.Fluent 1.31.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (7 by maintainers)
Top Results From Across the Web
Post parameter is always null
I noticed that since the controller action name was prefixed with "Get", Web API treated this as a HTTP GET rather than a...
Read more >AcountInfo is always null,Acountinfo.username is always null
I used loginWithCustomID then in OnSuccess callback I check for whats in Acountinfo and its null then I use AddUsernamePassword for ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Rookian For now, you can have simple workaround as below according to the exception you met.
If you don’t want to take extra GET request, please refer how we prepare ApiVersion in SDK And use below code to update the tags
@Rookian Great. Thanks for sharing the code snippet, I think it looks good.