sososo
Intern
Intern
  • UID1928
  • Fans0
  • Follows0
  • Posts2
Reads:1021Replies:3

billing information

Created#
More Posted time:Feb 6, 2017 13:08 PM
Hi All,
is there a way to get billing information in alibaba cloud?
(information such as output from billing management console)

I tried using the specified API in the link below
- https://maven-repository.com/artifact/com.aliyun/aliyun-java-sdk-billing/1.0.0

but there are no results in response as below

[source code]
IClientProfile profile = DefaultProfile.getProfile(REGION, ACCESS_KEY, SECRET_KEY);
IAcsClient client = new DefaultAcsClient(profile);

ListBillsRequest billRequest = new ListBillsRequest();
billRequest.setAccountPeriod("2017-02");
ListBillsResponse billResponse = client.getAcsResponse(billRequest);

System.out.println("totalCount = " + billResponse.getTotalCount());

List<Bill> bills = billResponse.getData();
for (Bill bill : bills) {
    System.out.println("billId = " + bill.getBillId());
}

[result]
totalCount = 0
[sososo edited the post at Feb 7, 2017 8:23 AM]

shhanshan
Forum Moderator
Forum Moderator
  • UID105
  • Fans3
  • Follows0
  • Posts269
1st Reply#
Posted time:Feb 6, 2017 23:15 PM
Sorry that we don't provide API interface about billing management to customers yet. So you can't get any data. Thanks

sososo
Intern
Intern
  • UID1928
  • Fans0
  • Follows0
  • Posts2
2nd Reply#
Posted time:Feb 7, 2017 8:39 AM
shhanshan:Sorry that we don't provide API interface about billing management to customers yet. So you can't get any data. Thanks回到原帖
is there no way to get usage data about resources?

shhanshan
Forum Moderator
Forum Moderator
  • UID105
  • Fans3
  • Follows0
  • Posts269
3rd Reply#
Posted time:Feb 7, 2017 13:12 PM
You can check the data usage from console--billing management
Guest