Here I used AWS java SDK for the programmatic access and when I try to call getCostAndUsageWithResources
, it is not available. But in java documentation it is mentioned that getCostAndUsageWithResources
method is available (Link for the Documentation).
Maven Dependency :-
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.11.728</version>
What you've added is only a parent POM. The SDK itself is splited in dozens of JARs, usually one per service. Try this one for costexplorer:
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-costexplorer</artifactId>
<version>1.11.728</version>
</dependency>