aws ce get-cost-and-usage-with-resources
Retrieves cost and usage metrics with resources for your account. AWS CLI reference
7 options Its page in the AWS CLI reference
Options
--billing-view-arnThe Amazon Resource Name (ARN) that uniquely identifies a specific billing view.--filterFilters Amazon Web Services costs by different dimensions.--granularitySets the Amazon Web Services cost granularity to MONTHLY, DAILY, or HOURLY.--group-byYou can group Amazon Web Services costs using up to two different groups: DIMENSION, TAG, COST_CATEGORY, and PRODUCT_ATTRIBUTE.--metricsWhich metrics are returned in the query.--next-page-tokenThe token to retrieve the next set of results.--time-periodSets the start and end dates for retrieving Amazon Web Services costs.