メインコンテンツへスキップ

list-aws-savings-plans

dci list-aws-savings-plans managementAccountId [flags]

Returns the paginated list of Savings Plans for the specified organization. Filterable by plan type and state.

Flags

--type: (string enum:"compute","ec2_instance","sagemaker","database")

--status: (string enum:"pending_return","returning","active","expired","queued","queued_returning","payment_failed","payment_pending")

--page-token: (string)

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

Output

Paginated list of Savings Plans.

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[].commitmentIdstringSavings Plan ID (AWS-assigned GUID).
items[].savingsPlanArnstringFull ARN of the Savings Plan.
items[].savingsPlanTypestringOne of: "compute", "ec2_instance", "sagemaker", "database".
items[].statestringOne of: "pending_return", "returning", "active", "expired", "queued", "queued_returning", "payment_failed", "payment_pending".
items[].paymentOptionstringOne of: "no_upfront", "partial_upfront", "all_upfront".
items[].termDurationstringCommitment term length. One of: "one_year", "three_year".
items[].commitmentobjectHourly commitment amount.
items[].commitment.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].commitment.currencystringISO 4217 currency code.
items[].upfrontPaymentAmountobject
items[].upfrontPaymentAmount.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].upfrontPaymentAmount.currencystringISO 4217 currency code.
items[].recurringPaymentAmountobject
items[].recurringPaymentAmount.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].recurringPaymentAmount.currencystringISO 4217 currency code.
items[].ec2InstanceFamilystring
items[].regionstring
items[].startTimestring (date-time)
items[].endTimestring (date-time)
items[].lastMonthUtilizationnumber (double)Utilization percentage (0–1) in the last full calendar month.
items[].lastMonthSavingsobjectRealized savings in the last full calendar month. Null if not yet available.
items[].lastMonthSavings.amountstringDecimal monetary amount at ISO 4217 minor-unit precision (string).
items[].lastMonthSavings.currencystringISO 4217 currency code.
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",
"savingsPlanType",
"state"
],
"properties": {
"commitmentId": {
"type": "string",
"description": "Savings Plan ID (AWS-assigned GUID)."
},
"savingsPlanArn": {
"type": "string",
"description": "Full ARN of the Savings Plan.",
"nullable": true
},
"savingsPlanType": {
"type": "string",
"enum": [
"compute",
"ec2_instance",
"sagemaker",
"database"
]
},
"state": {
"type": "string",
"enum": [
"pending_return",
"returning",
"active",
"expired",
"queued",
"queued_returning",
"payment_failed",
"payment_pending"
]
},
"paymentOption": {
"type": "string",
"enum": [
"no_upfront",
"partial_upfront",
"all_upfront"
]
},
"termDuration": {
"type": "string",
"enum": [
"one_year",
"three_year"
],
"description": "Commitment term length."
},
"commitment": {
"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": "Hourly commitment amount."
},
"upfrontPaymentAmount": {
"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"
}
}
}
]
},
"recurringPaymentAmount": {
"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"
}
}
}
]
},
"ec2InstanceFamily": {
"type": "string",
"nullable": true
},
"region": {
"type": "string",
"nullable": true
},
"startTime": {
"type": "string",
"format": "date-time",
"nullable": true
},
"endTime": {
"type": "string",
"format": "date-time",
"nullable": true
},
"lastMonthUtilization": {
"type": "number",
"format": "double",
"description": "Utilization percentage (0–1) in the last full calendar month.",
"nullable": true
},
"lastMonthSavings": {
"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": "Realized savings in the last full calendar month. Null if not yet available."
}
}
}
},
"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: listawssavingsplans