Skip to main content

list-aws-savings-plans

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

Returns the paginated list of Savings Plans for the specified MPA. 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)

Responses

200 (application/json)

Paginated list of Savings Plans.

{
"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
}
}
}

400 (application/problem+json)

Syntactically malformed request, missing required parameter, or unsupported parameter value.

{
"type": "object",
"required": [
"type",
"title",
"status",
"detail",
"instance",
"code",
"retryable"
],
"additionalProperties": true,
"description": "RFC 9457 Problem Details — standard DoiT error envelope for all non-2xx responses.",
"properties": {
"type": {
"type": "string",
"format": "uri",
"example": "https://developer.doit.com/errors/not_found"
},
"title": {
"type": "string",
"example": "Resource not found"
},
"status": {
"type": "integer",
"example": 404
},
"detail": {
"type": "string",
"example": "customer not found"
},
"instance": {
"type": "string",
"format": "uri",
"example": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9"
},
"code": {
"type": "string",
"pattern": "^([a-z][a-z0-9_]*|[a-z][a-z0-9]*(?:-[a-z0-9]+)*\\.[a-z][a-z0-9_]*)$",
"example": "not_found"
},
"retryable": {
"type": "boolean",
"example": false
},
"details": {
"type": "array",
"items": {
"type": "object",
"required": [
"issue"
],
"properties": {
"issue": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"field": {
"type": "string"
}
},
"additionalProperties": true
}
},
"docsUrl": {
"type": "string",
"format": "uri"
}
}
}

401 (application/problem+json)

Missing or invalid credentials.

{
"type": "object",
"required": [
"type",
"title",
"status",
"detail",
"instance",
"code",
"retryable"
],
"additionalProperties": true,
"description": "RFC 9457 Problem Details — standard DoiT error envelope for all non-2xx responses.",
"properties": {
"type": {
"type": "string",
"format": "uri",
"example": "https://developer.doit.com/errors/not_found"
},
"title": {
"type": "string",
"example": "Resource not found"
},
"status": {
"type": "integer",
"example": 404
},
"detail": {
"type": "string",
"example": "customer not found"
},
"instance": {
"type": "string",
"format": "uri",
"example": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9"
},
"code": {
"type": "string",
"pattern": "^([a-z][a-z0-9_]*|[a-z][a-z0-9]*(?:-[a-z0-9]+)*\\.[a-z][a-z0-9_]*)$",
"example": "not_found"
},
"retryable": {
"type": "boolean",
"example": false
},
"details": {
"type": "array",
"items": {
"type": "object",
"required": [
"issue"
],
"properties": {
"issue": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"field": {
"type": "string"
}
},
"additionalProperties": true
}
},
"docsUrl": {
"type": "string",
"format": "uri"
}
}
}

403 (application/problem+json)

Authenticated but not authorised to access this customer's PS4C resources.

{
"type": "object",
"required": [
"type",
"title",
"status",
"detail",
"instance",
"code",
"retryable"
],
"additionalProperties": true,
"description": "RFC 9457 Problem Details — standard DoiT error envelope for all non-2xx responses.",
"properties": {
"type": {
"type": "string",
"format": "uri",
"example": "https://developer.doit.com/errors/not_found"
},
"title": {
"type": "string",
"example": "Resource not found"
},
"status": {
"type": "integer",
"example": 404
},
"detail": {
"type": "string",
"example": "customer not found"
},
"instance": {
"type": "string",
"format": "uri",
"example": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9"
},
"code": {
"type": "string",
"pattern": "^([a-z][a-z0-9_]*|[a-z][a-z0-9]*(?:-[a-z0-9]+)*\\.[a-z][a-z0-9_]*)$",
"example": "not_found"
},
"retryable": {
"type": "boolean",
"example": false
},
"details": {
"type": "array",
"items": {
"type": "object",
"required": [
"issue"
],
"properties": {
"issue": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"field": {
"type": "string"
}
},
"additionalProperties": true
}
},
"docsUrl": {
"type": "string",
"format": "uri"
}
}
}

500 (application/problem+json)

Unexpected server error.

{
"type": "object",
"required": [
"type",
"title",
"status",
"detail",
"instance",
"code",
"retryable"
],
"additionalProperties": true,
"description": "RFC 9457 Problem Details — standard DoiT error envelope for all non-2xx responses.",
"properties": {
"type": {
"type": "string",
"format": "uri",
"example": "https://developer.doit.com/errors/not_found"
},
"title": {
"type": "string",
"example": "Resource not found"
},
"status": {
"type": "integer",
"example": 404
},
"detail": {
"type": "string",
"example": "customer not found"
},
"instance": {
"type": "string",
"format": "uri",
"example": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9"
},
"code": {
"type": "string",
"pattern": "^([a-z][a-z0-9_]*|[a-z][a-z0-9]*(?:-[a-z0-9]+)*\\.[a-z][a-z0-9_]*)$",
"example": "not_found"
},
"retryable": {
"type": "boolean",
"example": false
},
"details": {
"type": "array",
"items": {
"type": "object",
"required": [
"issue"
],
"properties": {
"issue": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"field": {
"type": "string"
}
},
"additionalProperties": true
}
},
"docsUrl": {
"type": "string",
"format": "uri"
}
}
}

503 (application/problem+json)

Service temporarily unavailable; retry after the indicated delay.

{
"type": "object",
"required": [
"type",
"title",
"status",
"detail",
"instance",
"code",
"retryable"
],
"additionalProperties": true,
"description": "RFC 9457 Problem Details — standard DoiT error envelope for all non-2xx responses.",
"properties": {
"type": {
"type": "string",
"format": "uri",
"example": "https://developer.doit.com/errors/not_found"
},
"title": {
"type": "string",
"example": "Resource not found"
},
"status": {
"type": "integer",
"example": 404
},
"detail": {
"type": "string",
"example": "customer not found"
},
"instance": {
"type": "string",
"format": "uri",
"example": "https://api.doit.com/requests/req_01HX9P2KQVJ8Z3M4T5N6V7W8Y9"
},
"code": {
"type": "string",
"pattern": "^([a-z][a-z0-9_]*|[a-z][a-z0-9]*(?:-[a-z0-9]+)*\\.[a-z][a-z0-9_]*)$",
"example": "not_found"
},
"retryable": {
"type": "boolean",
"example": false
},
"details": {
"type": "array",
"items": {
"type": "object",
"required": [
"issue"
],
"properties": {
"issue": {
"type": "string",
"pattern": "^[a-z][a-z0-9_]*$"
},
"field": {
"type": "string"
}
},
"additionalProperties": true
}
},
"docsUrl": {
"type": "string",
"format": "uri"
}
}
}

Aliases: list-aws-savings-plans, listawssavingsplans