@@ -1325,6 +1325,45 @@ def ex_read_account(self, dry_run: bool = False):
13251325 data = json .dumps ({"DryRun" : dry_run })
13261326 return self ._call_api (action , data ).json ()["Accounts" ][0 ]
13271327
1328+ def ex_list_consumption_account (
1329+ self ,
1330+ from_date : str = None ,
1331+ to_date : str = None ,
1332+ dry_run : bool = False
1333+ ):
1334+ """
1335+ Displays information about the consumption of your account for
1336+ each billable resource within the specified time period.
1337+
1338+
1339+ :param from_date: The beginning of the time period, in
1340+ ISO 8601 date-time format (for example, 2017-06-14 or
1341+ 2017-06-14T00:00:00Z). (required)
1342+ :type from_date: ``str``
1343+
1344+ :param to_date: The end of the time period, in
1345+ ISO 8601 date-time format (for example, 2017-06-30 or
1346+ 2017-06-30T00:00:00Z). (required)
1347+ :type to_date: ``str``
1348+
1349+ :param dry_run: If true, checks whether you have the required
1350+ permissions to perform the action.
1351+ :type dry_run: ``bool``
1352+
1353+ :return: a list of Consumption Entries
1354+ :rtype: ``list`` of ``dict``
1355+ """
1356+ action = "ReadConsumptionAccount"
1357+ data = {"DryRun" : dry_run }
1358+ if from_date is not None :
1359+ data .update ({"FromDate" : from_date })
1360+ if to_date is not None :
1361+ data .update ({"ToDate" : to_date })
1362+ response = self ._call_api (action , json .dumps (data ))
1363+ if response .status_code == 200 :
1364+ return response .json ()["ConsumptionEntries" ]
1365+ return response .json ()
1366+
13281367 def ex_create_account (
13291368 self ,
13301369 city : str = None ,
0 commit comments