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.
| Field | Type | Description |
|---|---|---|
items | array of object | |
items[].commitmentId | string | Savings Plan ID (AWS-assigned GUID). |
items[].savingsPlanArn | string | Full ARN of the Savings Plan. |
items[].savingsPlanType | string | One of: "compute", "ec2_instance", "sagemaker", "database". |
items[].state | string | One of: "pending_return", "returning", "active", "expired", "queued", "queued_returning", "payment_failed", "payment_pending". |
items[].paymentOption | string | One of: "no_upfront", "partial_upfront", "all_upfront". |
items[].termDuration | string | Commitment term length. One of: "one_year", "three_year". |
items[].commitment | object | Hourly commitment amount. |
items[].commitment.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
items[].commitment.currency | string | ISO 4217 currency code. |
items[].upfrontPaymentAmount | object | |
items[].upfrontPaymentAmount.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
items[].upfrontPaymentAmount.currency | string | ISO 4217 currency code. |
items[].recurringPaymentAmount | object | |
items[].recurringPaymentAmount.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
items[].recurringPaymentAmount.currency | string | ISO 4217 currency code. |
items[].ec2InstanceFamily | string | |
items[].region | string | |
items[].startTime | string (date-time) | |
items[].endTime | string (date-time) | |
items[].lastMonthUtilization | number (double) | Utilization percentage (0–1) in the last full calendar month. |
items[].lastMonthSavings | object | Realized savings in the last full calendar month. Null if not yet available. |
items[].lastMonthSavings.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
items[].lastMonthSavings.currency | string | ISO 4217 currency code. |
pageToken | string | |
rowCount | integer (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 status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
| 500, 503 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Aliases: listawssavingsplans