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

get-aws-recommendation

dci get-aws-recommendation <managementAccountId> <serviceId> [flags]

Returns the recommendation for one commitment type (serviceId) on the AWS organization, including analysis metrics and time-bucketed eligible spend. Use granularity to choose the eligible-spend bucket size (defaults to day).

  • managementAccountId — 12-digit AWS management (payer) account ID (the account that owns the AWS Organization) that scopes the request.
  • serviceId — Commitment type whose recommendation to retrieve. Must be an onboarded commitment type for the AWS organization (compute or database).

--granularity accepts hour, day (default), week or month. Coarser buckets report minUsage, medianUsage and maxUsage per bucket; hour reports totalUsage per hour. list-aws-recommendations returns the recommendation block for every onboarded commitment type at once, without the eligible-usage series.

Examples

# The compute Savings Plan recommendation with daily eligible-spend buckets (the default granularity).
dci get-aws-recommendation <management-account-id> compute
# The database recommendation with one eligible-spend bucket per month.
dci get-aws-recommendation <management-account-id> database --granularity month
# Hourly eligible-spend totals as JSON, for your own analysis.
dci get-aws-recommendation <management-account-id> compute --granularity hour --output json

Flags

FlagTypeDefaultExampleDescription
--granularitystring"day"Time bucket size for eligible-spend data points on the recommendation response. If omitted, defaults to day. Coarser buckets return min/max/median usage; hour returns per-hour totals. One of: "hour", "day", "week", "month".

Every command also accepts the CLI-wide flags for output shaping — see Output formats and Table output options.

Output

Commitment type recommendation together with the eligible-spend time series used for analysis and charting.

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

FieldTypeDescription
recommendationobjectRecommended commitment metrics for the requested commitment type.
recommendation.policystringCoverage target policy currently configured for this commitment type (for example, conservative, balanced, or max_savings).
recommendation.currentCommitmentnumber (double)Active hourly commitment ($/h) currently applied to this AWS organization and commitment type, including commitments already purchased.
recommendation.recommendedCommitmentnumber (double)Recommended total hourly commitment ($/h) based on usage patterns and your commitment policy. Designed to increase savings while managing underutilization risk.
recommendation.potentialAdditionalSavingsnumber (double)Estimated additional monthly savings ($/month) from applying the recommended commitment relative to currentCommitment.
recommendation.estimatedAverageCoveragenumber (double)Estimated average coverage (0–1) of eligible spend if the recommended commitment were in place.
recommendation.estimatedEquivalentRecommendedCommitmentnumber (double)Shelf-price hourly equivalent ($/h) of the recommended commitment, derived from the median hourly eligible usage over the last 60 days multiplied by estimatedAverageCoverage. Use this to compare the recommendation line to eligible usage on charts.
eligibleUsagearray of objectEligible spend over time at the requested granularity. Empty when no eligible usage exists in the trailing window.
eligibleUsage[].usageTimestring (date-time)Start of the time bucket for this data point (UTC).
eligibleUsage[].totalUsagenumber (double)Total eligible usage in the bucket when granularity is hour. Prefer min/max/median for coarser granularities.
eligibleUsage[].minUsagenumber (double)Minimum eligible usage ($/h) observed in the bucket (day/week/month views).
eligibleUsage[].maxUsagenumber (double)Maximum eligible usage ($/h) observed in the bucket (day/week/month views).
eligibleUsage[].medianUsagenumber (double)Median eligible usage ($/h) observed in the bucket (day/week/month views).
Raw JSON schema
{
"type": "object",
"properties": {
"recommendation": {
"allOf": [
{
"type": "object",
"description": "Recommended commitment levels and savings estimates for one PerfectScale for Commitments commitment type on an AWS organization.",
"properties": {
"policy": {
"type": "string",
"description": "Coverage target policy currently configured for this commitment type (for example, `conservative`, `balanced`, or `max_savings`)."
},
"currentCommitment": {
"type": "number",
"format": "double",
"description": "Active hourly commitment ($/h) currently applied to this AWS organization and commitment type, including commitments already purchased."
},
"recommendedCommitment": {
"type": "number",
"format": "double",
"description": "Recommended total hourly commitment ($/h) based on usage patterns and your commitment policy. Designed to increase savings while managing underutilization risk."
},
"potentialAdditionalSavings": {
"type": "number",
"format": "double",
"description": "Estimated additional monthly savings ($/month) from applying the recommended commitment relative to `currentCommitment`."
},
"estimatedAverageCoverage": {
"type": "number",
"format": "double",
"description": "Estimated average coverage (0–1) of eligible spend if the recommended commitment were in place."
},
"estimatedEquivalentRecommendedCommitment": {
"type": "number",
"format": "double",
"description": "Shelf-price hourly equivalent ($/h) of the recommended commitment, derived from the median hourly eligible usage over the last 60 days multiplied by `estimatedAverageCoverage`. Use this to compare the recommendation line to eligible usage on charts."
}
}
}
],
"description": "Recommended commitment metrics for the requested commitment type."
},
"eligibleUsage": {
"type": "array",
"description": "Eligible spend over time at the requested `granularity`. Empty when no eligible usage exists in the trailing window.",
"items": {
"type": "object",
"description": "One time-bucketed eligible-spend usage point for the recommendation chart. Units are shelf-price hourly dollars ($/h) unless noted by the client visualization.",
"properties": {
"usageTime": {
"type": "string",
"format": "date-time",
"description": "Start of the time bucket for this data point (UTC).",
"nullable": true
},
"totalUsage": {
"type": "number",
"format": "double",
"description": "Total eligible usage in the bucket when granularity is `hour`. Prefer min/max/median for coarser granularities."
},
"minUsage": {
"type": "number",
"format": "double",
"description": "Minimum eligible usage ($/h) observed in the bucket (day/week/month views)."
},
"maxUsage": {
"type": "number",
"format": "double",
"description": "Maximum eligible usage ($/h) observed in the bucket (day/week/month views)."
},
"medianUsage": {
"type": "number",
"format": "double",
"description": "Median eligible usage ($/h) observed in the bucket (day/week/month views)."
}
}
}
}
}
}

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 to exit code mapping
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: getawsrecommendation