list-gcp-billing-accounts-settings
dci list-gcp-billing-accounts-settings [flags]
Returns one item per onboarded GCP Billing Account. Each item includes that billing
account's recommendation and automation engine settings for each product line activated
on it (compute).
Settings are stored independently on each billing account. Existing customer-level settings are copied lazily when an account is first read or initialized; if no valid legacy value exists, the complete backend defaults are materialized once on the account. Only product lines that are activated/onboarded for a given billing account are returned.
In the DoiT Console, these settings are edited on an account's Settings tab.
Flags
| Flag | Type | Default | Example | Description |
|---|---|---|---|---|
--page-token | string | Opaque cursor token returned by a previous list response. Omit to start from the beginning; an empty or absent token in a response means there are no more results. Do not parse it. A structurally invalid cursor returns 400 with code pagination_token_invalid; an expired cursor returns 400 with code pagination_token_expired — restart pagination from the beginning. | ||
--max-results | integer | 50 | Maximum number of items to return. Server may return fewer. Defaults to 50; maximum 500. |
Every command also accepts the CLI-wide flags for output shaping — see Output formats and Table output options.
Output
Settings payload for one onboarded GCP Billing Account, broken down by activated product line (services[].settings).
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[].billingAccountId | string | GCP Billing Account ID. |
items[].services | array of object | Settings for each product line activated on this billing account. |
items[].services[].service | string | Product line these settings apply to. One of: "compute". |
items[].services[].settings | object | Commitment settings for this product line. |
items[].services[].settings.purchaseMode | string | Whether purchases execute automatically or require customer approval before the planner proceeds. Configured in the DoiT Console Settings tab; this settings API is read-only. One of: "autonomous", "requires_approval". |
items[].services[].settings.minimumCommitment | number (double) | Minimum hourly commitment amount (USD) per purchase step. |
items[].services[].settings.lastDayOfMonthForPurchase | integer | Latest calendar day of the month on which a purchase may be scheduled. |
items[].services[].settings.maximumCommitment | number (double) | Maximum total hourly commitment (USD). 0 means no cap. |
items[].services[].settings.term | string | Preferred commitment term length for new purchases. |
items[].services[].settings.policy | string | Coverage target policy for recommendations and purchases. |
pageToken | string | Opaque cursor for the next page. Absent when this is the last page. |
rowCount | integer (int64) | Number of items returned in this page. |
Raw JSON schema
{
"type": "object",
"required": [
"items"
],
"properties": {
"items": {
"type": "array",
"items": {
"type": "object",
"required": [
"billingAccountId",
"services"
],
"properties": {
"billingAccountId": {
"type": "string",
"description": "GCP Billing Account ID.",
"example": "01D4A2-4E3F1B-9C72A0"
},
"services": {
"type": "array",
"items": {
"type": "object",
"required": [
"service",
"settings"
],
"properties": {
"service": {
"type": "string",
"enum": [
"compute"
],
"description": "Product line these settings apply to."
},
"settings": {
"allOf": [
{
"type": "object",
"description": "Recommendation and automation engine settings for one product line on a GCP billing account.",
"required": [
"purchaseMode",
"minimumCommitment",
"lastDayOfMonthForPurchase",
"maximumCommitment",
"term",
"policy"
],
"properties": {
"purchaseMode": {
"type": "string",
"enum": [
"autonomous",
"requires_approval"
],
"description": "Whether purchases execute automatically or require customer approval before the planner proceeds. Configured in the DoiT Console Settings tab; this settings API is read-only.",
"x-enumDescriptions": {
"autonomous": "Purchases execute automatically within configured commitment limits. Set in the DoiT Console (Autonomous Purchasing).",
"requires_approval": "Purchases wait for customer approval in the DoiT Console before execution. Default mode; set in Console Settings."
}
},
"minimumCommitment": {
"type": "number",
"format": "double",
"description": "Minimum hourly commitment amount (USD) per purchase step."
},
"lastDayOfMonthForPurchase": {
"type": "integer",
"description": "Latest calendar day of the month on which a purchase may be scheduled."
},
"maximumCommitment": {
"type": "number",
"format": "double",
"description": "Maximum total hourly commitment (USD). `0` means no cap."
},
"term": {
"allOf": [
{
"type": "string",
"enum": [
"one_year",
"three_year"
],
"description": "Preferred or actual commitment term length for Savings Plans and related settings.",
"x-enumDescriptions": {
"one_year": "One-year commitment term.",
"three_year": "Three-year commitment term."
}
}
],
"description": "Preferred commitment term length for new purchases."
},
"policy": {
"allOf": [
{
"type": "string",
"enum": [
"conservative",
"balanced",
"max_savings"
],
"description": "Coverage target policy that balances savings against underutilization risk. Used by recommendations and planned-purchase projections.",
"x-enumDescriptions": {
"conservative": "Lower coverage target (~65%); favors stable usage and lower underutilization risk.",
"balanced": "Moderate coverage target (~80%); default balance of savings and buffer.",
"max_savings": "Aggressive coverage target (~90%); highest savings potential with a smaller buffer."
}
}
],
"description": "Coverage target policy for recommendations and purchases."
}
}
}
],
"description": "Commitment settings for this product line."
}
}
},
"description": "Settings for each product line activated on this billing account."
}
}
}
},
"pageToken": {
"type": "string",
"description": "Opaque cursor for the next page. Absent when this is the last page.",
"nullable": true
},
"rowCount": {
"type": "integer",
"format": "int64",
"description": "Number of items returned in this page."
}
}
}
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 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, 503 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Related
- get-gcp-billing-account — Get a GCP billing account
- get-gcp-recommendation — Get a GCP recommendation
- list-gcp-billing-accounts — List GCP billing accounts
- list-gcp-planned-purchases — List GCP planned purchases
- list-gcp-recommendations — List GCP recommendations
- list-gcp-resource-cuds — List GCP resource-based Committed Use Discounts
- list-gcp-spend-cuds — List GCP spend-based Committed Use Discounts
- API reference: GET /ps4commitments/v1/gcp/settings
Aliases: listgcpbillingaccountssettings