Description
Describe the bug
A clear and concise description of what the bug is.
planInformation()
method of ReservationOrderResponse
always returns null
.
All other reservation order data is present on all returned items from result of calling manager.reservationOrders().list()
and iterating/viewing it in debug mode.
Exception or Stack Trace
Add the exception log and stack trace if available
N/A
To Reproduce
Steps to reproduce the behavior:
Run the code snippet, all other reservation order data is present but the billing plan information.
Code Snippet
Add the code snippet that causes the issue.
public class GetCosts {
public static void main(String[] args) {
AzureProfile profile = new AzureProfile(AzureEnvironment.AZURE);
TokenCredential credential = new DefaultAzureCredentialBuilder()
.authorityHost(profile.getEnvironment().getActiveDirectoryEndpoint())
.build();
ReservationsManager manager = ReservationsManager
.authenticate(credential, profile);
manager.reservationOrders().list().forEach(
reservationOrder -> System.out.println(reservationOrder.planInformation())
);
}
}
Expected behavior
A clear and concise description of what you expected to happen.
call to planInformation
of ReservationOrderResponse
contains plan information as described here: https://learn.microsoft.com/en-us/java/api/com.azure.resourcemanager.reservations.models.reservationorderbillingplaninformation?view=azure-java-preview
Screenshots
If applicable, add screenshots to help explain your problem.
Output of the above snippet:
17:12:22.359 [main] INFO com.azure.identity.ChainedTokenCredential -- Azure Identity => Attempted credential EnvironmentCredential is unavailable.
17:12:22.361 [main] INFO com.azure.identity.ChainedTokenCredential -- Azure Identity => Attempted credential WorkloadIdentityCredential is unavailable.
17:12:22.924 [ForkJoinPool.commonPool-worker-1] INFO com.azure.identity.ChainedTokenCredential -- Azure Identity => Attempted credential ManagedIdentityCredential is unavailable.
17:12:22.930 [ForkJoinPool.commonPool-worker-1] INFO com.azure.identity.ChainedTokenCredential -- Azure Identity => Attempted credential SharedTokenCacheCredential is unavailable.
17:12:23.074 [ForkJoinPool.commonPool-worker-1] INFO com.azure.identity.ChainedTokenCredential -- Azure Identity => Attempted credential IntelliJCredential is unavailable.
17:12:24.063 [ForkJoinPool.commonPool-worker-1] INFO com.azure.identity.AzureCliCredential -- Azure Identity => getToken() result for scopes [https://management.core.windows.net//.default]: SUCCESS
17:12:24.063 [ForkJoinPool.commonPool-worker-1] INFO com.azure.identity.ChainedTokenCredential -- Azure Identity => Attempted credential AzureCliCredential returns a token
17:12:24.065 [ForkJoinPool.commonPool-worker-1] INFO com.azure.core.implementation.AccessTokenCache -- {"az.sdk.message":"Acquired a new access token."}
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
null
Setup (please complete the following information):
- OS: [e.g. iOS] Mac OS Sonoma 14.1 (23B74)
- IDE: [e.g. IntelliJ] IntelliJ
- Library/Libraries: [e.g. com.azure:azure-core:1.16.0 (groupId:artifactId:version)] azure-resourcemanager-reservations, 1.0.0-beta.2
- Java version: [e.g. 8] openjdk 21.0.1 2023-10-17
- App Server/Environment: [e.g. Tomcat, WildFly, Azure Function, Apache Spark, Databricks, IDE plugin or anything special]
- Frameworks: [e.g. Spring Boot, Micronaut, Quarkus, etc] Spring Boo
If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError
, NoSuchMethodError
or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:
- verbose dependency tree (
mvn dependency:tree -Dverbose
) - exception message, full stack trace, and any available logs
Additional context
Add any other context about the problem here.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Bug Description Added
- Repro Steps Added
- Setup information Added