list-commitments
dci list-commitments [flags]
Returns a list of commitments for the customer. Commitments are listed in reverse chronological order by default.
dci list-commitments presents a curated table by default:
- Columns:
name,provider(fromcloudProvider),commitment,attainment, andforecast(fromtotalCommitmentValue,totalCurrentAttainment, andtotalForecastValue, all with the commitment's currency symbol), plusstartandenddates. --output jsonand explicit-C/--fieldsselections return the raw fields documented below.
Flags
--sort-by: (string enum:"name","startDate","endDate","provider","createTime","updateTime")
--sort-order: (string enum:"asc","desc")
--max-results: (integer format:int64 default:50)
--page-token: (string)
--filter: (string)
Output
OK - The request succeeded.
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 |
|---|---|---|
pageToken | string | Page token. It is used to request a specific page of the list results. |
rowCount | integer (int64) | The number of returned records. |
commitments | array of object | Array of commitments. |
commitments[].id | string | The unique identifier of the commitment. |
commitments[].name | string | The name of the commitment. |
commitments[].startDate | string (date-time) | The start date of the commitment. |
commitments[].endDate | string (date-time) | The end date of the commitment. |
commitments[].currency | string | The currency of the commitment. |
commitments[].cloudProvider | string | The cloud provider associated with the commitment. One of: "google-cloud", "amazon-web-services", "microsoft-azure". |
commitments[].totalCommitmentValue | number (double) | The total value of the commitment across all periods. |
commitments[].totalCurrentAttainment | number (double) | The total current spend attainment across all periods. |
commitments[].totalMarketplaceSpend | number (double) | The total marketplace spend across all periods. |
commitments[].totalForecastValue | number (double) | The total projected spend at the end of the commitment, summed across all periods. 0 when insufficient history is available to compute a forecast. |
commitments[].periods | array of object | The list of commitment periods. |
commitments[].periods[].startDate | string (date-time) | The start date of the period. |
commitments[].periods[].endDate | string (date-time) | The end date of the period. |
commitments[].periods[].commitmentValue | number (double) | The commitment value for this period. |
commitments[].periods[].marketplaceLimitPercentage | number (double) | The marketplace limit as a percentage (0-100). |
commitments[].periods[].marketplaceSpend | number (double) | The marketplace spend within this period. |
commitments[].periods[].marketplaceLimitAmount | number (double) | The marketplace limit in absolute currency for this period, derived as commitmentValue * marketplaceLimitPercentage / 100. |
commitments[].periods[].forecastValue | number (double) | The projected spend at the end of this period, based on a linear regression over the period's total spend series. 0 when insufficient history is available to compute a forecast. |
commitments[].createTime | integer (int64) | The creation time in milliseconds since epoch. |
commitments[].updateTime | integer (int64) | The last update time in milliseconds since epoch. |
Raw JSON schema
{
"type": "object",
"description": "List of commitments.",
"properties": {
"pageToken": {
"type": "string",
"description": "Page token. It is used to request a specific page of the list results.",
"example": "bDl0QkEwVFZxUEwxaUJRaHhTcXM"
},
"rowCount": {
"type": "integer",
"description": "The number of returned records.",
"format": "int64",
"example": 1
},
"commitments": {
"type": "array",
"description": "Array of commitments.",
"items": {
"type": "object",
"description": "Summary information of a commitment in a list.",
"properties": {
"id": {
"type": "string",
"description": "The unique identifier of the commitment."
},
"name": {
"type": "string",
"description": "The name of the commitment."
},
"startDate": {
"type": "string",
"format": "date-time",
"example": "2024-03-10T23:00:00Z",
"description": "The start date of the commitment."
},
"endDate": {
"type": "string",
"format": "date-time",
"example": "2024-03-10T23:00:00Z",
"description": "The end date of the commitment."
},
"currency": {
"type": "string",
"description": "The currency of the commitment.",
"example": "USD"
},
"cloudProvider": {
"type": "string",
"description": "The cloud provider associated with the commitment.",
"enum": [
"google-cloud",
"amazon-web-services",
"microsoft-azure"
]
},
"totalCommitmentValue": {
"type": "number",
"format": "double",
"description": "The total value of the commitment across all periods."
},
"totalCurrentAttainment": {
"type": "number",
"format": "double",
"description": "The total current spend attainment across all periods."
},
"totalMarketplaceSpend": {
"type": "number",
"format": "double",
"description": "The total marketplace spend across all periods."
},
"totalForecastValue": {
"type": "number",
"format": "double",
"description": "The total projected spend at the end of the commitment, summed across all periods. 0 when insufficient history is available to compute a forecast."
},
"periods": {
"type": "array",
"description": "The list of commitment periods.",
"items": {
"type": "object",
"description": "A single period within a commitment.",
"properties": {
"startDate": {
"type": "string",
"format": "date-time",
"example": "2024-03-10T23:00:00Z",
"description": "The start date of the period."
},
"endDate": {
"type": "string",
"format": "date-time",
"example": "2024-03-10T23:00:00Z",
"description": "The end date of the period."
},
"commitmentValue": {
"type": "number",
"format": "double",
"description": "The commitment value for this period."
},
"marketplaceLimitPercentage": {
"type": "number",
"format": "double",
"description": "The marketplace limit as a percentage (0-100)."
},
"marketplaceSpend": {
"type": "number",
"format": "double",
"description": "The marketplace spend within this period."
},
"marketplaceLimitAmount": {
"type": "number",
"format": "double",
"description": "The marketplace limit in absolute currency for this period, derived as commitmentValue * marketplaceLimitPercentage / 100."
},
"forecastValue": {
"type": "number",
"format": "double",
"description": "The projected spend at the end of this period, based on a linear regression over the period's total spend series. 0 when insufficient history is available to compute a forecast."
}
}
}
},
"createTime": {
"type": "integer",
"format": "int64",
"description": "The creation time in milliseconds since epoch."
},
"updateTime": {
"type": "integer",
"format": "int64",
"description": "The last update time in milliseconds since epoch."
}
}
}
}
}
}
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. |
| 500 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Aliases: listcommitments