-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[FEATURE REQ] make costmanagement compatible with last sdk version. #8764
Comments
@ChenTanyi could you help publish the cost management to the latest runtime? Thanks. //cc @yungezz |
@erzads Do you use any client-runtime package lower than 1.7.0? I've tested with these two packages successfully. The test code is https://github.com/tanyi-test/azure-sdk-for-java-8764. PS: but the request got 404 which makes it raise a null pointer exception. |
@ChenTanyi I couldn't find instructions on why dependencies I should add. I am using maven and I just included the dependency com.microsoft.azure/azure@1.31.1 |
@erzads No, you shouldn't add other package unless you know about it. You can see my test code, I just add these two package together, and they work fine. If you use any client-runtime package lower than 1.7.0, please remove them or upgrade to 1.7.* |
@ChenTanyi cost management package is quite old and it's runtime need updated. |
@yaohaizh cost management doesn't include runtime-authentication for ApplicationTokenCredentials, so it work fine to use the credential in azure 1.31.1, we don't need to update every package runtime due to it. |
Then, the costmanagement used the old codesign signature, thus we cannot have two different signature for runtime, it is not necessary depends on runtime-authentitcaion. |
The root case is that there is a lower version authentication being included in the project. I guess there is a dependency in @erzads project: <dependency>
<groupId>com.microsoft.azure</groupId>
<artifactId>azure-client-authentication</artifactId>
<version>1.6.*</version>
</dependency> @erzads if there is a dependency like it, please remove it. Otherwise, please give me your dependency in pom.xml or dependency:tree. Besides, I've publish com.microsoft.azure.costmanagement.v2018_05_31/azure-mgmt-costmanagement@1.0.0-beta-1 with latest dependency. You can try with it, but I don't think it works if you just change such dependency. |
@erzads could you try the latest bits from @ChenTanyi to see whether this issue is fixed. Thanks. |
Sorry for the delay. I ended up doing all by rest. Please, could you point me to the documentation on how to use the cost management sdk? |
I admit I am lost here, but I am trying to list each resource group cost: I get JsonParseException the first 3 times, and then null pointer exception after that.
|
The NPE usually is due to the response status code is 404. You can use the the following configure to check http request is OK or not. CostManagementManager
.configure()
.withLogLevel(LogLevel.BODY_AND_HEADERS)
.authenticate... |
After my quick test, it seems the service not supports this apiVersion. {
"error": {
"code": "InvalidResourceType",
"message": "The resource type 'operations' could not be found in the namespace 'Microsoft.CostManagement' for api version '2018-05-31'. The supported api-versions are '2017-10-01-preview,2018-08-31,2019-01-01,2018-08-01-preview,2018-10-01,2019-10-01'."
}
} but actually the api was here: https://github.com/azure/azure-rest-api-specs/blob/1c3a60403422ca8c73df7eb7c65ae2a3c90bf152/specification/cost-management/resource-manager/Microsoft.CostManagement/stable/2018-05-31/costmanagement.json#L778 I'll add service attention for it and generate a new version SDK for test. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @mspremp, @ramaganesan-rg. |
@erzads And also, I've released costmanagement v2019_11_01, you can try it later, if there is still service error. |
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs into keyvault_multiapi_readme * 'master' of https://github.com/Azure/azure-rest-api-specs: (101 commits) add cli.md for automation (Azure#8411) adjust assignment (Azure#8782) Remove Microsoft.Backup.Admin 2016-05-01 API version (Azure#8588) Updating global setting in PostgreSQL/MySQL readme file (Azure#8777) update package name and output folder in readme.typescript.md (Azure#8764) add package-2019-12 python define (Azure#8769) Fix Parameter Description for validate resource move (Azure#8524) Edit pass for GA swagger (Azure#8759) Update proxy.json (Azure#8596) Model enums that may change in the future as strings (Azure#8760) Add api-version 2019-11-01 for resources/subscriptions (Azure#8728) regenerated all-api-versions PrivateLinkResources for Microsoft.Automation (Azure#8369) add cli.md for serialconsole (Azure#8401) add cli.md for mariadb (Azure#8466) [Computer Vision] Create CV API v3.0-preview (Azure#7402) Publish Microsoft.ContainerService api-version 2020-03-01 (Azure#8756) Update swagger based on auto-gen process change. (Azure#8766) add assignment-bot config (Azure#8716) add tag package-2019-12 to batch (Azure#8751) ...
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs into keyvault_multiapi_readme * 'master' of https://github.com/Azure/azure-rest-api-specs: (101 commits) add cli.md for automation (Azure#8411) adjust assignment (Azure#8782) Remove Microsoft.Backup.Admin 2016-05-01 API version (Azure#8588) Updating global setting in PostgreSQL/MySQL readme file (Azure#8777) update package name and output folder in readme.typescript.md (Azure#8764) add package-2019-12 python define (Azure#8769) Fix Parameter Description for validate resource move (Azure#8524) Edit pass for GA swagger (Azure#8759) Update proxy.json (Azure#8596) Model enums that may change in the future as strings (Azure#8760) Add api-version 2019-11-01 for resources/subscriptions (Azure#8728) regenerated all-api-versions PrivateLinkResources for Microsoft.Automation (Azure#8369) add cli.md for serialconsole (Azure#8401) add cli.md for mariadb (Azure#8466) [Computer Vision] Create CV API v3.0-preview (Azure#7402) Publish Microsoft.ContainerService api-version 2020-03-01 (Azure#8756) Update swagger based on auto-gen process change. (Azure#8766) add assignment-bot config (Azure#8716) add tag package-2019-12 to batch (Azure#8751) ...
Merge branch 'master' of https://github.com/Azure/azure-rest-api-specs into keyvault_multiapi_readme * 'master' of https://github.com/Azure/azure-rest-api-specs: (101 commits) add cli.md for automation (Azure#8411) adjust assignment (Azure#8782) Remove Microsoft.Backup.Admin 2016-05-01 API version (Azure#8588) Updating global setting in PostgreSQL/MySQL readme file (Azure#8777) update package name and output folder in readme.typescript.md (Azure#8764) add package-2019-12 python define (Azure#8769) Fix Parameter Description for validate resource move (Azure#8524) Edit pass for GA swagger (Azure#8759) Update proxy.json (Azure#8596) Model enums that may change in the future as strings (Azure#8760) Add api-version 2019-11-01 for resources/subscriptions (Azure#8728) regenerated all-api-versions PrivateLinkResources for Microsoft.Automation (Azure#8369) add cli.md for serialconsole (Azure#8401) add cli.md for mariadb (Azure#8466) [Computer Vision] Create CV API v3.0-preview (Azure#7402) Publish Microsoft.ContainerService api-version 2020-03-01 (Azure#8756) Update swagger based on auto-gen process change. (Azure#8766) add assignment-bot config (Azure#8716) add tag package-2019-12 to batch (Azure#8751) ...
@ChenTanyi, @erzads. Is this still an issue? can this item be closed? |
Hello @erzads - apologies for the delay in our response. At this point, we are not sure if the issue still persists at your end. we are archiving the request. |
Is your feature request related to a problem? Please describe.
I am using com.microsoft.azure/azure@1.31.1 and I need to fetch cost information.
I have been looking everywhere in the sdk until I found com.microsoft.azure.costmanagement.v2018_05_31/azure-mgmt-costmanagement@1.0.0-beta.
I tried using it but I get:
Caused by: java.lang.SecurityException: class "com.microsoft.azure.credentials.ApplicationTokenCredentials"'s signer information does not match signer information of other classes in the same package
Describe the solution you'd like
Could a compatible version be made?
Describe alternatives you've considered
Stop using de sdk and doing all by hand/rest.
Additional context
None
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
The text was updated successfully, but these errors were encountered: