CmdID

CmdID / aws / aws ec2

aws ec2 get-capacity-reservation-usage

Gets usage information about a Capacity Reservation. AWS CLI reference

1 example 4 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 view capacity reservation usage across AWS accounts

The following get-capacity-reservation-usage example displays usage information for the specified capacity reservation.

aws ec2 get-capacity-reservation-usage --capacity-reservation-id cr-1234abcd56EXAMPLEIdentify
--capacity-reservation-idThe ID of the Capacity Reservation.
Its output
{
    "CapacityReservationId": "cr-1234abcd56EXAMPLE ",
    "InstanceUsages": [
        {
            "UsedInstanceCount": 1,
            "AccountId": "123456789012"
        }
    ],
    "AvailableInstanceCount": 4,
    "TotalInstanceCount": 5,
    "State": "active",
    "InstanceType": "t2.medium"
}

For more information, see Shared Capacity Reservations in the Amazon EC2 User Guide.

Options

4 in the AWS CLI reference
--capacity-reservation-idThe ID of the Capacity Reservation.
--dry-runChecks whether you have the required permissions for the action, without actually making the request, and provides an error response.
--max-resultsThe maximum number of items to return for this request.
--next-tokenThe token to use to retrieve the next page of results.