CmdID

CmdID / aws / aws ce

aws ce get-reservation-coverage

Retrieves the reservation coverage for your account, which you can use to see how much of your Amazon Elastic Compute Cloud, Amazon ElastiCache, Amazon Relational Database Service, or Amazon Redshift usage is covered by a reservation. AWS CLI reference

1 example 8 options Its page in the AWS CLI reference

Opens CmdID with your command. It is read in your browser and sent nowhere.

Examples

from aws-cli, each command read by CmdID

To retrieve the reservation coverage for EC2 t2.nano instances in the us-west-2 region

The following get-reservation-coverage example retrieves the reservation coverage for EC2 t2.nano instances in the us-west-2 region for July-September of 2017.

aws ce get-reservation-coverage --time-period Start=2017-07-01,End=2017-10-01 --group-by Type=Dimension,Key=REGION --filter file://filters.jsonIdentify
--time-periodThe start and end dates of the period that you want to retrieve data about reservation coverage for.
--group-byYou can group the data by the following attributes: AZ CACHE_ENGINE DATABASE_ENGINE DEPLOYMENT_OPTION INSTANCE_TYPE INVOICING_ENTITY LINKED_ACCOUNT OPERATING_SYSTEM PLATFORM REGION TENANCY
--filterFilters utilization data by dimensions.

Contents of filters.json:

{
    "And": [
        {
            "Dimensions": {
                "Key": "INSTANCE_TYPE",
                "Values": [
                    "t2.nano"
                ]
            }
        },
        {
            "Dimensions": {
                "Key": "REGION",
                "Values": [
                    "us-west-2"
                ]
            }
        }
    ]
}
Its output, shortened
{
    "CoveragesByTime": [
        {
            "TimePeriod": {
                "Start": "2017-07-01",
                "End": "2017-10-01"
            },
            "Groups": [
                {
                    "Attributes": {
                        "region": "us-west-2"
                    },
                    "Coverage": {
                        "CoverageHours": {
                            "OnDemandHours": "3000",
                            "ReservedHours": "1000",
                            "TotalRunningHours": "4000",
                            "CoverageHoursPercentage": "25"
                        }
                    }
                }
            ],
            "Total": {
                "CoverageHours": {
                    "OnDemandHours": "3000",
                    "ReservedHours": "1000",
                    "TotalRunningHours": "4000",
                    "CoverageHoursPercentage": "25"
                }
            }
… 11 more lines

For more information, see Understanding reservations in Cost Explorer in the AWS Cost Management User Guide.

Options

8 in the AWS CLI reference
--filterFilters utilization data by dimensions.
--granularityThe granularity of the Amazon Web Services cost data for the reservation.
--group-byYou can group the data by the following attributes: AZ CACHE_ENGINE DATABASE_ENGINE DEPLOYMENT_OPTION INSTANCE_TYPE INVOICING_ENTITY LINKED_ACCOUNT OPERATING_SYSTEM PLATFORM REGION TENANCY
--max-resultsThe maximum number of objects that you returned for this request.
--metricsThe measurement that you want your reservation coverage reported in.
--next-page-tokenThe token to retrieve the next set of results.
--sort-byThe value by which you want to sort the data.
--time-periodThe start and end dates of the period that you want to retrieve data about reservation coverage for.