You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Outer loop -> GetReservationOrders: App gets all reservation orders, does some filtering
var orderCollection = tenantResource.GetReservationOrders().GetAllAsync();
await foreach (ReservationOrderResource orderResource in orderCollection)
{
.......
}
=> working as expected.
2) Then, Inner loop: For all ReservationOrders returned , app gets all ReservationDetails
var reservationDetailCollection = orderResource.GetReservationDetails();
await foreach (ReservationDetailResource reservationDetailResource in reservationDetailCollection.GetAllAsync())
{
.......
}
=> working as expected for all ReservationOrders EXCEPT reservation is a Hybrid Benefit reservation. In this case an exception is thrown
Expected behavior
GetReservationDetails() working for all types of reservation
Actual behavior
If a reservation order is a hybrid benefit reservation an exception is thrown:
"Exception":"System.ArgumentException: Value cannot be an empty string. (Parameter 'resourceId')
at Azure.Core.Argument.AssertNotNullOrEmpty(String value, String name)
at Azure.Core.ResourceIdentifier..ctor(String resourceId)
at Azure.ResourceManager.Reservations.Models.ReservationProperties.DeserializeReservationProperties(JsonElement element)
at Azure.ResourceManager.Reservations.ReservationDetailData.DeserializeReservationDetailData(JsonElement element)
at Azure.ResourceManager.Reservations.ReservationDetailCollection.<GetAllAsync>b__7_2(JsonElement e)
at Azure.Core.PageableHelpers.PageableImplementation`1.GetAsyncEnumerator(CancellationToken cancellationToken)+MoveNext()
at Azure.Core.PageableHelpers.PageableImplementation`1.GetAsyncEnumerator(CancellationToken cancellationToken)+System.Threading.Tasks.Sources.IValueTaskSource<System.Boolean>.GetResult()
at .... await foreach from inner loop above
** Note**: For all other reservations (78) everything works as expected => looks like deserializing this type of reservation fails
Reproduction Steps
For obvious reasons i cannot share credentials for TenantResource here..
But problem can be reproduced by using example code and only change: Guid reservationOrderId = Guid.Parse("276e7ae4-84d0-4da6-ab4b-d6b94f3557da");
with a reservation order Guid that references a hybrid benefit reservation resource.
Environment
Linux Container on AKS
.NET Core 6.0 LTS
Visual Studio CE 2022, 17.6.5
The text was updated successfully, but these errors were encountered:
Link to sample
https://learn.microsoft.com/en-us/rest/api/reserved-vm-instances/reservation/list?tabs=dotnet
Library name and version
Azure.ResourceManager.Reservations (1.3.0)
Language of the Sample
Sample Issue Type
Issue details
=> working as expected.
2) Then, Inner loop: For all ReservationOrders returned , app gets all ReservationDetails
=> working as expected for all ReservationOrders EXCEPT reservation is a Hybrid Benefit reservation. In this case an exception is thrown
Expected behavior
GetReservationDetails() working for all types of reservation
Actual behavior
If a reservation order is a hybrid benefit reservation an exception is thrown:
** Note**: For all other reservations (78) everything works as expected => looks like deserializing this type of reservation fails
Reproduction Steps
For obvious reasons i cannot share credentials for TenantResource here..
But problem can be reproduced by using example code and only change:
Guid reservationOrderId = Guid.Parse("276e7ae4-84d0-4da6-ab4b-d6b94f3557da");
with a reservation order Guid that references a hybrid benefit reservation resource.
Environment
Linux Container on AKS
.NET Core 6.0 LTS
Visual Studio CE 2022, 17.6.5
The text was updated successfully, but these errors were encountered: