If I have several running instances can I request the costs over a certain
periode or should I use the spot price for each instance and multiply that
based on their creation date?
It depends on the provider you're talking to (see [1] for some
background on core jclouds concepts). jclouds doesn't include pricing
information in its ComputeService abstraction because it's not
something available in some kind of standardized way across clouds at
this point.
But for things like AWS EC2 spot requests, access to some pricing
information is available through provider-specific APIs, e.g. [2].
And for some APIs, it would be possible to have pricing information
included in the NodeMetadata [3] in some way, although I am not aware
that jclouds currently does this for any provider/API.
Hope that helps!
ap
[1] https://wiki.apache.org/jclouds/Core%20Concepts
[2]
http://javadocs.jclouds.cloudbees.net/org/jclouds/aws/ec2/features/SpotInstanceApi.html
[3]
http://javadocs.jclouds.cloudbees.net/org/jclouds/compute/domain/NodeMetadata.html