Skip to main content

list-aws-reserved-instances

dci list-aws-reserved-instances managementAccountId [flags]

Returns the paginated list of Reserved Instances (RIs) for the specified organization. Filterable by state, instance type/family, region, and offering class.

Flags

--status: (string enum:"active","retired","payment_pending","payment_failed","queued","queued_deleted")

--instance-type: (string)

--instance-family: (string)

--region: (string)

--offering-class: (string enum:"standard","convertible")

--page-token: (string)

--max-results: (integer default:50)

Output

Paginated list of Reserved Instances.

By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.

FieldTypeDescription
itemsarray of object
items[].commitmentIdstringReserved Instance ID (AWS-assigned).
items[].reservedInstanceArnstringFull ARN of the Reserved Instance, when known.
items[].accountIdstringAWS account ID where the Reserved Instance exists.
items[].statestringReserved Instance state, tracking the AWS EC2 Reserved Instance API verbatim in external snake_case form. Differs from Savings Plan states by design — for example, the terminal state is retired here vs expired on Savings Plans. One of: "active", "retired", "payment_pending", "payment_failed", "queued", "queued_deleted".
items[].instanceTypestringEC2 instance type on which the RI can be used (e.g. m5.large).
items[].instanceCountinteger (int64)
items[].instanceTenancystringTenancy of the instance (e.g. default, dedicated).
items[].availabilityZonestring
items[].regionstring
items[].platformstring
items[].descriptionstringProduct platform description.
items[].scopestringScope of the Reserved Instance (e.g. Availability Zone, Region).
items[].offeringClassstringOne of: "standard", "convertible".
items[].offeringTypestringRI offering type (e.g. All Upfront).
items[].termDurationstringTerm inferred from the RI duration. Absent when it does not map cleanly to 1yr / 3yr.
items[].durationSecondsinteger (int64)RI duration in seconds.
items[].startTimestring (date-time)
items[].endTimestring (date-time)
items[].currencyCodestringISO 4217 currency code (USD in practice).
items[].fixedPriceobjectPurchase price of the Reserved Instance.
items[].fixedPrice.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].fixedPrice.currencystringISO 4217 currency code.
items[].usagePriceobjectUsage price per hour.
items[].usagePrice.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].usagePrice.currencystringISO 4217 currency code.
items[].hourlyRecurringFeeobject
items[].hourlyRecurringFee.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].hourlyRecurringFee.currencystringISO 4217 currency code.
items[].upfrontFeeobject
items[].upfrontFee.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].upfrontFee.currencystringISO 4217 currency code.
items[].totalAssetValueobject
items[].totalAssetValue.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].totalAssetValue.currencystringISO 4217 currency code.
items[].averageOnDemandHourlyRateobject
items[].averageOnDemandHourlyRate.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].averageOnDemandHourlyRate.currencystringISO 4217 currency code.
items[].amortizedRecurringFeeobject
items[].amortizedRecurringFee.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].amortizedRecurringFee.currencystringISO 4217 currency code.
items[].amortizedUpfrontFeeobject
items[].amortizedUpfrontFee.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].amortizedUpfrontFee.currencystringISO 4217 currency code.
items[].totalAmortizedFeeobject
items[].totalAmortizedFee.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].totalAmortizedFee.currencystringISO 4217 currency code.
items[].netRiSavingsobject
items[].netRiSavings.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].netRiSavings.currencystringISO 4217 currency code.
items[].realizedSavingsobject
items[].realizedSavings.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].realizedSavings.currencystringISO 4217 currency code.
items[].unrealizedSavingsobject
items[].unrealizedSavings.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].unrealizedSavings.currencystringISO 4217 currency code.
items[].totalPotentialRiSavingsobject
items[].totalPotentialRiSavings.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].totalPotentialRiSavings.currencystringISO 4217 currency code.
items[].onDemandCostOfRiHoursUsedobject
items[].onDemandCostOfRiHoursUsed.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].onDemandCostOfRiHoursUsed.currencystringISO 4217 currency code.
items[].riCostForUnusedHoursobject
items[].riCostForUnusedHours.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].riCostForUnusedHours.currencystringISO 4217 currency code.
items[].purchasedHoursinteger (int64)
items[].purchasedUnitsinteger (int64)
items[].totalActualHoursinteger (int64)
items[].totalNormalizedUnitsinteger (int64)
items[].unusedHoursinteger (int64)
items[].unusedNormalizedUnitsinteger (int64)
items[].utilizationPercentagenumber (double)Cost-explorer reported utilization percentage (0–1).
items[].utilizationPercentageInUnitsnumber (double)
items[].mtdSavingsobjectMonth-to-date realized savings.
items[].mtdSavings.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].mtdSavings.currencystringISO 4217 currency code.
items[].mtdUtilizationnumber (double)Month-to-date utilization (0–1). Null when not yet available. A stored 0% is indistinguishable from unavailable and is returned as null.
items[].updatedAtstring (date-time)Timestamp of the last successful inventory sync for this Reserved Instance.
items[].recurringChargesarray of object
items[].recurringCharges[].amountnumber (double)The amount of the recurring charge.
items[].recurringCharges[].frequencystringThe frequency of the recurring charge (e.g. Hourly).
pageTokenstring
rowCountinteger (int64)Best-effort count for the filtered result set. May be null or omitted for expensive counts.
Raw JSON schema
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"commitmentId",
"accountId",
"state",
"instanceType",
"mtdSavings"
],
"description": "Reserved Instance item in the external inventory response. Money fields are wrapped `{amount, currency}` objects.",
"properties": {
"commitmentId": {
"type": "string",
"description": "Reserved Instance ID (AWS-assigned)."
},
"reservedInstanceArn": {
"type": "string",
"description": "Full ARN of the Reserved Instance, when known.",
"nullable": true
},
"accountId": {
"type": "string",
"description": "AWS account ID where the Reserved Instance exists."
},
"state": {
"type": "string",
"description": "Reserved Instance state, tracking the AWS EC2 Reserved Instance API verbatim in\nexternal snake_case form. Differs from Savings Plan states by design — for example,\nthe terminal state is `retired` here vs `expired` on Savings Plans.\n",
"enum": [
"active",
"retired",
"payment_pending",
"payment_failed",
"queued",
"queued_deleted"
]
},
"instanceType": {
"type": "string",
"description": "EC2 instance type on which the RI can be used (e.g. `m5.large`)."
},
"instanceCount": {
"type": "integer",
"format": "int64",
"nullable": true
},
"instanceTenancy": {
"type": "string",
"description": "Tenancy of the instance (e.g. `default`, `dedicated`)."
},
"availabilityZone": {
"type": "string",
"nullable": true
},
"region": {
"type": "string",
"nullable": true
},
"platform": {
"type": "string",
"nullable": true
},
"description": {
"type": "string",
"description": "Product platform description."
},
"scope": {
"type": "string",
"description": "Scope of the Reserved Instance (e.g. `Availability Zone`, `Region`)."
},
"offeringClass": {
"type": "string",
"enum": [
"standard",
"convertible"
]
},
"offeringType": {
"type": "string",
"description": "RI offering type (e.g. `All Upfront`)."
},
"termDuration": {
"allOf": [
{
"type": "string",
"enum": [
"one_year",
"three_year"
],
"description": "Commitment term length."
}
],
"description": "Term inferred from the RI duration. Absent when it does not map cleanly to 1yr / 3yr."
},
"durationSeconds": {
"type": "integer",
"format": "int64",
"description": "RI duration in seconds.",
"nullable": true
},
"startTime": {
"type": "string",
"format": "date-time",
"nullable": true
},
"endTime": {
"type": "string",
"format": "date-time",
"nullable": true
},
"currencyCode": {
"type": "string",
"description": "ISO 4217 currency code (USD in practice)."
},
"fixedPrice": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Purchase price of the Reserved Instance."
},
"usagePrice": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Usage price per hour."
},
"hourlyRecurringFee": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"upfrontFee": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"totalAssetValue": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"averageOnDemandHourlyRate": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"amortizedRecurringFee": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"amortizedUpfrontFee": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"totalAmortizedFee": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"netRiSavings": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"realizedSavings": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"unrealizedSavings": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"totalPotentialRiSavings": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"onDemandCostOfRiHoursUsed": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"riCostForUnusedHours": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
]
},
"purchasedHours": {
"type": "integer",
"format": "int64",
"nullable": true
},
"purchasedUnits": {
"type": "integer",
"format": "int64",
"nullable": true
},
"totalActualHours": {
"type": "integer",
"format": "int64",
"nullable": true
},
"totalNormalizedUnits": {
"type": "integer",
"format": "int64",
"nullable": true
},
"unusedHours": {
"type": "integer",
"format": "int64",
"nullable": true
},
"unusedNormalizedUnits": {
"type": "integer",
"format": "int64",
"nullable": true
},
"utilizationPercentage": {
"type": "number",
"format": "double",
"description": "Cost-explorer reported utilization percentage (0–1).",
"nullable": true
},
"utilizationPercentageInUnits": {
"type": "number",
"format": "double",
"nullable": true
},
"mtdSavings": {
"allOf": [
{
"type": "object",
"required": [
"amount",
"currency"
],
"properties": {
"amount": {
"type": "string",
"pattern": "^-?(0|[1-9]\\d*)(\\.\\d+)?$",
"description": "Decimal monetary amount at ISO 4217 minor-unit precision (string)."
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Month-to-date realized savings."
},
"mtdUtilization": {
"type": "number",
"format": "double",
"description": "Month-to-date utilization (0–1). Null when not yet available. A stored 0% is\nindistinguishable from unavailable and is returned as null.\n",
"nullable": true
},
"updatedAt": {
"type": "string",
"format": "date-time",
"description": "Timestamp of the last successful inventory sync for this Reserved Instance.",
"nullable": true
},
"recurringCharges": {
"type": "array",
"items": {
"type": "object",
"required": [
"amount",
"frequency"
],
"properties": {
"amount": {
"type": "number",
"format": "double",
"description": "The amount of the recurring charge."
},
"frequency": {
"type": "string",
"description": "The frequency of the recurring charge (e.g. `Hourly`)."
}
}
}
}
}
}
},
"pageToken": {
"type": "string",
"nullable": true
},
"rowCount": {
"type": "integer",
"format": "int64",
"description": "Best-effort count for the filtered result set. May be null or omitted for expensive counts.",
"nullable": true
}
}
}

Errors

On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.

HTTP statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
40420RESOURCE_NOT_FOUNDThe requested resource does not exist. Check the identifier argument.
500, 50340API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: listawsreservedinstances