Skip to content

Instantly share code, notes, and snippets.

@rah003
Created November 22, 2019 14:50
Show Gist options
  • Save rah003/9e272ee3361e90ac859d62869cc12876 to your computer and use it in GitHub Desktop.
Save rah003/9e272ee3361e90ac859d62869cc12876 to your computer and use it in GitHub Desktop.
def retrieveData(self, results, filter):
data = cd.get_cost_and_usage(TimePeriod={'Start': start, 'End': end},
Granularity='MONTHLY', Metrics=['UnblendedCost'],
**filter,
GroupBy=[{'Type': 'DIMENSION', 'Key': 'LINKED_ACCOUNT'}, {'Type': 'DIMENSION', 'Key': 'SERVICE'}], **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment