Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java Billing-resource-manager doesn't not work and consumption-resource-manager too #23943

Closed
KononikhinDanila opened this issue Sep 7, 2021 · 4 comments
Assignees
Labels
ARM bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Mgmt This issue is related to a management-plane library.

Comments

@KononikhinDanila
Copy link

KononikhinDanila commented Sep 7, 2021

I'm trying to get my account billings via Java and I used sample from azure documentation
https://docs.microsoft.com/en-us/java/api/overview/azure/resourcemanager-billing-readme?view=azure-java-preview
But, this solution seems not working, because I see this picture in debug mode:
first
All entities in the object f are null and innerClient throws this exception :
Method threw 'com.azure.core.http.rest.MissingRequiredAnnotationException' exception. Cannot evaluate com.azure.resourcemanager.billing.implementation.$Proxy5.toString().

Then I tried to use Consumption librariry to get billing data and got exact the same situation:
https://docs.microsoft.com/en-us/java/api/overview/azure/resourcemanager-consumption-readme?view=azure-java-preview
second
All entities show null and elements from innerObject throw this exception:
Method threw 'com.azure.core.http.rest.MissingRequiredAnnotationException' exception. Cannot evaluate com.azure.resourcemanager.consumption.implementation.$Proxy14.toString()
My pom file:

<dependencies>
    <dependency>
        <groupId>com.azure.resourcemanager</groupId>
        <artifactId>azure-resourcemanager-consumption</artifactId>
        <version>1.0.0-beta.2</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.azure/azure-identity -->
    <dependency>
        <groupId>com.azure</groupId>
        <artifactId>azure-identity</artifactId>
        <version>1.3.5</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/com.azure/azure-core-http-netty -->
    <dependency>
        <groupId>com.azure</groupId>
        <artifactId>azure-core-http-netty</artifactId>
        <version>1.10.0</version>
    </dependency>
</dependencies>

Any ideas how to fix it? Or what I'm doing wrong?

@joshfree joshfree added ARM bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. Mgmt This issue is related to a management-plane library. labels Sep 7, 2021
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Sep 7, 2021
@joshfree
Copy link
Member

joshfree commented Sep 7, 2021

Hi @KononikhinDanila thank you for filing this github issue. Someone from the ARM SDK team will follow up with you shortly.

/cc @weidongxu-microsoft

@weidongxu-microsoft
Copy link
Member

weidongxu-microsoft commented Oct 9, 2021

@KononikhinDanila

Please call something within the client/manager. The client uses lazy initialization, until you call something, it's object is null.

E.g. sample for consumption lib https://docs.microsoft.com/en-us/java/api/overview/azure/resourcemanager-consumption-readme?view=azure-java-preview#examples

Similar for billing https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/billing/azure-resourcemanager-billing/SAMPLE.md

Know that these samples are for illustration purpose. Do not use the value directly, as many of them is just placeholders.

@weidongxu-microsoft weidongxu-microsoft added the issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. label Oct 18, 2021
@ghost
Copy link

ghost commented Oct 18, 2021

Hi @KononikhinDanila. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “/unresolve” to remove the “issue-addressed” label and continue the conversation.

@ghost ghost removed the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Oct 18, 2021
@ghost
Copy link

ghost commented Nov 3, 2021

Hi @KononikhinDanila, since you haven’t asked that we “/unresolve” the issue, we’ll close this out. If you believe further discussion is needed, please add a comment “/unresolve” to reopen the issue.

@ghost ghost closed this as completed Nov 3, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ARM bug This issue requires a change to an existing behavior in the product in order to be resolved. customer-reported Issues that are reported by GitHub users external to the Azure organization. issue-addressed Workflow: The Azure SDK team believes it to be addressed and ready to close. Mgmt This issue is related to a management-plane library.
Projects
None yet
Development

No branches or pull requests

3 participants