get-gcp-billing-account
dci get-gcp-billing-account <billingAccountId>
Returns a single GCP Billing Account with the same list-item fields as List GCP Billing Accounts, plus the Overview time series. Use this when you need a single billing account's Console Overview in one call (identity and onboarding status, 30-day ESR and savings, YTD/lifetime totals, CUD export health, and the data behind Cost Summary and CUD Coverage charts) without fetching every billing account.
Fields that drive the Overview tab in the DoiT console — each is an array with one entry per product line (service of compute or cloud_sql):
-
stats30d: last 30 days ESR and realized savings per product line (ESR and Savings cards). -
monthlyStats: last 6 calendar months of ESR, on-demand cost, and cost with savings per product line (Cost Summary chart, and month-over-month card trends). -
dailyCoverage: last 30 days of CUD coverage breakdown per product line (CUD Coverage chart). -
savingsTotals: year-to-date and lifetime realized savings per product line (shown under the Savings card). Lifetime is bounded by PerfectScale for Commitments onboarding start. -
billingAccountId— GCP Billing Account ID (formatXXXXXX-XXXXXX-XXXXXX; the account that owns the CUDs) that scopes the request.
Output
Single GCP Billing Account details (same list-item fields as provided for the billing account through list GCP billing accounts operation) and overview time series: 6 months stats and 30 days of CUD coverage.
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 |
|---|---|---|
monthlyStats | array of object | Trailing 6 calendar months of billing account stats per product line (compute, cloud_sql), ordered compute first. Absent when no product line has stats. |
monthlyStats[].service | string | Product line these monthly stats belong to. One of: "compute", "cloud_sql". |
monthlyStats[].months | array of object | Monthly aggregates, sorted ascending by month. |
monthlyStats[].months[].month | string | Calendar month in YYYY-MM form (UTC). |
monthlyStats[].months[].esr | number (double) | Effective Savings Rate (ESR) for the month, as a fraction from 0 to 1. Measures what share of eligible spend is saved through active commitments compared with equivalent on-demand cost. |
monthlyStats[].months[].onDemandCost | object | Eligible on-demand cost for the month. On-demand cost is eligible cloud spend priced at full on-demand rates, that is, not discounted by a commitment. |
monthlyStats[].months[].onDemandCost.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
monthlyStats[].months[].onDemandCost.currency | string | ISO 4217 currency code. |
monthlyStats[].months[].costWithSavings | object | Actual cost after commitments for the month. |
monthlyStats[].months[].costWithSavings.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
monthlyStats[].months[].costWithSavings.currency | string | ISO 4217 currency code. |
dailyCoverage | array of object | Trailing 30 days of CUD coverage per product line (compute, cloud_sql), ordered compute first. Absent when no product line has coverage data. |
dailyCoverage[].service | string | Product line this coverage series belongs to. One of: "compute", "cloud_sql". |
dailyCoverage[].days | array of object | Daily coverage rows, sorted ascending by date. |
dailyCoverage[].days[].date | string (date) | Calendar day (UTC) for this coverage row in format YYYY-MM-DD. |
dailyCoverage[].days[].computeFlexible | object | Spend covered by Compute Flexible CUDs for the day. |
dailyCoverage[].days[].computeFlexible.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].computeFlexible.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].cloudRun | object | Spend covered by Cloud Run CUDs for the day. |
dailyCoverage[].days[].cloudRun.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].cloudRun.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].bigQuery | object | Spend covered by BigQuery CUDs for the day. |
dailyCoverage[].days[].bigQuery.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].bigQuery.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].bigtable | object | Spend covered by Bigtable CUDs for the day. |
dailyCoverage[].days[].bigtable.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].bigtable.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].cloudSql | object | Spend covered by Cloud SQL CUDs for the day. |
dailyCoverage[].days[].cloudSql.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].cloudSql.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].cloudFirestore | object | Spend covered by Cloud Firestore CUDs for the day. |
dailyCoverage[].days[].cloudFirestore.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].cloudFirestore.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].cloudSpanner | object | Spend covered by Cloud Spanner CUDs for the day. |
dailyCoverage[].days[].cloudSpanner.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].cloudSpanner.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].memorystoreForRedis | object | Spend covered by Memorystore for Redis CUDs for the day. |
dailyCoverage[].days[].memorystoreForRedis.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].memorystoreForRedis.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].alloyDb | object | Spend covered by AlloyDB CUDs for the day. |
dailyCoverage[].days[].alloyDb.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].alloyDb.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].backupForOracle | object | Spend covered by Google Cloud Backup and DR for Oracle CUDs for the day. |
dailyCoverage[].days[].backupForOracle.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].backupForOracle.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].kafka | object | Spend covered by Kafka CUDs for the day. |
dailyCoverage[].days[].kafka.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].kafka.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].resourceBased | object | Spend covered by resource-based (vCPU / memory) CUDs for the day. |
dailyCoverage[].days[].resourceBased.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].resourceBased.currency | string | ISO 4217 currency code. |
dailyCoverage[].days[].onDemand | object | On-demand spend not covered by any CUD for the day. |
dailyCoverage[].days[].onDemand.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
dailyCoverage[].days[].onDemand.currency | string | ISO 4217 currency code. |
billingAccountId | string | GCP Billing Account ID. |
displayName | string | Human-readable account name, if available. Defaults to the GCP Billing Account display name; may be overridden by a custom name set on the asset in the DoiT Console. Null when no name is available. |
currency | string | ISO 4217 currency code for this billing account. |
onboardingStatus | array of object | PerfectScale for Commitments onboarding status per product line (compute, cloud_sql), ordered compute first. A product line is omitted when it is not onboarded; the field is absent when no product line is onboarded. |
onboardingStatus[].service | string | Product line this onboarding status belongs to. One of: "compute", "cloud_sql". |
onboardingStatus[].status | string | Current onboarding lifecycle stage for this product line. One of: "not_started", "onboarding", "done", "error". |
onboardingStatus[].onboardingStartedAt | string (date-time) | When PerfectScale for Commitments first began tracking commitments for this commitment type. Bounds lifetime savings totals and onboarding history in the DoiT Console. Omitted or null when onboarding has not started. |
cudExportHealthy | boolean | true if the BigQuery CUD export is healthy and up to date. |
commitmentsSyncTime | string (date-time) | Timestamp of the last successful CUD inventory sync. Null when a sync has not completed yet. |
stats30d | array of object | Trailing 30-day aggregate metrics (esr, savings) per product line (compute, cloud_sql), ordered compute first. Absent when no product line has stats. |
stats30d[].service | string | Product line these metrics belong to. One of: "compute", "cloud_sql". |
stats30d[].esr | number (double) | Effective Savings Rate (ESR) over the last 30 days, as a fraction from 0 to 1 (for example, 0.187 is 18.7%). Measures what share of eligible spend is saved through active commitments compared with equivalent on-demand cost. Higher ESR means greater realized savings. Null when not yet available. |
stats30d[].savings | object | Total savings realized over the last 30 days from active commitments (USD). |
stats30d[].savings.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
stats30d[].savings.currency | string | ISO 4217 currency code. |
savingsTotals | array of object | Year-to-date and lifetime savings per product line (compute, cloud_sql), ordered compute first; absent when no product line has totals. Same values as returned by GET /ps4commitments/v1/gcp/billing-accounts/\{billingAccountId\} for this billing account, so callers can sum totals across billing accounts without making an extra get-by-id call per billing account. Lifetime is bounded by each billing account's PerfectScale for Commitments onboarding start date. |
savingsTotals[].service | string | Product line these savings totals belong to. One of: "compute", "cloud_sql". |
savingsTotals[].ytd | object | Year-to-date realized savings. |
savingsTotals[].ytd.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
savingsTotals[].ytd.currency | string | ISO 4217 currency code. |
savingsTotals[].lifetime | object | Lifetime realized savings since onboarding. |
savingsTotals[].lifetime.amount | string | Decimal monetary amount at ISO 4217 minor-unit precision (string). |
savingsTotals[].lifetime.currency | string | ISO 4217 currency code. |
Raw JSON schema
{
"allOf": [
{
"type": "object",
"required": [
"billingAccountId"
],
"properties": {
"billingAccountId": {
"type": "string",
"description": "GCP Billing Account ID.",
"example": "01D4A2-4E3F1B-9C72A0"
},
"displayName": {
"type": "string",
"description": "Human-readable account name, if available. Defaults to the GCP Billing Account display name; may be overridden by a custom name set on the asset in the DoiT Console. Null when no name is available.",
"nullable": true
},
"currency": {
"type": "string",
"description": "ISO 4217 currency code for this billing account.",
"nullable": true,
"example": "USD"
},
"onboardingStatus": {
"type": "array",
"description": "PerfectScale for Commitments onboarding status per product line (`compute`, `cloud_sql`), ordered `compute` first. A product line is omitted when it is not onboarded; the field is absent when no product line is onboarded.",
"items": {
"description": "Onboarding status entry for one product line. When `done`, inventory and recommendations for that commitment type are available.",
"allOf": [
{
"type": "object",
"required": [
"status"
],
"properties": {
"status": {
"type": "string",
"description": "Current onboarding lifecycle stage for this product line.",
"enum": [
"not_started",
"onboarding",
"done",
"error"
],
"x-enumDescriptions": {
"not_started": "This commitment type has not begun onboarding.",
"onboarding": "Onboarding is in progress (inventory and models still initializing).",
"done": "Onboarding completed, commitments and recommendations are available.",
"error": "Onboarding failed, check the DoiT Console or contact support for remediation."
}
},
"onboardingStartedAt": {
"type": "string",
"format": "date-time",
"description": "When PerfectScale for Commitments first began tracking commitments for this commitment type. Bounds lifetime savings totals and onboarding history in the DoiT Console. Omitted or null when onboarding has not started.",
"nullable": true
}
}
},
{
"type": "object",
"required": [
"service"
],
"properties": {
"service": {
"type": "string",
"enum": [
"compute",
"cloud_sql"
],
"description": "Product line this onboarding status belongs to."
}
}
}
]
}
},
"cudExportHealthy": {
"type": "boolean",
"description": "`true` if the BigQuery CUD export is healthy and up to date.",
"nullable": true
},
"commitmentsSyncTime": {
"type": "string",
"format": "date-time",
"description": "Timestamp of the last successful CUD inventory sync. Null when a sync has not completed yet.",
"nullable": true
},
"stats30d": {
"type": "array",
"description": "Trailing 30-day aggregate metrics (`esr`, `savings`) per product line (`compute`, `cloud_sql`), ordered `compute` first. Absent when no product line has stats.",
"items": {
"description": "Trailing 30-day aggregate metrics for one product line.",
"allOf": [
{
"type": "object",
"description": "Minimal 30-day aggregate. Only `esr` and `savings` are persisted at this granularity. Responses are denominated in USD.",
"properties": {
"esr": {
"type": "number",
"format": "double",
"description": "Effective Savings Rate (ESR) over the last 30 days, as a fraction from 0 to 1 (for example, `0.187` is 18.7%). Measures what share of eligible spend is saved through active commitments compared with equivalent on-demand cost. Higher ESR means greater realized savings. Null when not yet available.",
"nullable": true,
"example": 0.187
},
"savings": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Total savings realized over the last 30 days from active commitments (USD)."
}
}
},
{
"type": "object",
"required": [
"service"
],
"properties": {
"service": {
"type": "string",
"enum": [
"compute",
"cloud_sql"
],
"description": "Product line these metrics belong to."
}
}
}
]
}
},
"savingsTotals": {
"type": "array",
"description": "Year-to-date and lifetime savings per product line (`compute`, `cloud_sql`), ordered `compute` first; absent when no product line has totals. Same values as returned by `GET /ps4commitments/v1/gcp/billing-accounts/{billingAccountId}` for this billing account, so callers can sum totals across billing accounts without making an extra get-by-id call per billing account. Lifetime is bounded by each billing account's PerfectScale for Commitments onboarding start date.",
"items": {
"description": "Year-to-date and lifetime realized savings for one product line.",
"allOf": [
{
"type": "object",
"required": [
"ytd",
"lifetime"
],
"description": "Running savings figures derived server-side from the full monthly stats history, as the sum of `onDemandCost - costWithSavings` per month. `lifetime` starts at PerfectScale for Commitments onboarding; `ytd` starts at the later of January 1 of the current year and onboarding. Months before the bound are excluded; the bound month and the current month are prorated.",
"properties": {
"ytd": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Year-to-date realized savings."
},
"lifetime": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Lifetime realized savings since onboarding."
}
}
},
{
"type": "object",
"required": [
"service"
],
"properties": {
"service": {
"type": "string",
"enum": [
"compute",
"cloud_sql"
],
"description": "Product line these savings totals belong to."
}
}
}
]
}
}
}
},
{
"type": "object",
"properties": {
"monthlyStats": {
"type": "array",
"description": "Trailing 6 calendar months of billing account stats per product line (`compute`, `cloud_sql`), ordered `compute` first. Absent when no product line has stats.",
"items": {
"type": "object",
"description": "Trailing 6 calendar months of billing account stats for one product line.",
"required": [
"service",
"months"
],
"properties": {
"service": {
"type": "string",
"enum": [
"compute",
"cloud_sql"
],
"description": "Product line these monthly stats belong to."
},
"months": {
"type": "array",
"description": "Monthly aggregates, sorted ascending by `month`.",
"items": {
"type": "object",
"required": [
"month",
"esr",
"onDemandCost",
"costWithSavings"
],
"description": "One calendar-month aggregate for the billing account. Money fields are wrapped objects (`{amount, currency}`).",
"properties": {
"month": {
"type": "string",
"pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
"description": "Calendar month in `YYYY-MM` form (UTC).",
"example": "2025-06"
},
"esr": {
"type": "number",
"format": "double",
"description": "Effective Savings Rate (ESR) for the month, as a fraction from 0 to 1. Measures what share of eligible spend is saved through active commitments compared with equivalent on-demand cost."
},
"onDemandCost": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Eligible on-demand cost for the month. On-demand cost is eligible cloud spend priced at full on-demand rates, that is, not discounted by a commitment."
},
"costWithSavings": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Actual cost after commitments for the month."
}
}
}
}
}
}
},
"dailyCoverage": {
"type": "array",
"description": "Trailing 30 days of CUD coverage per product line (`compute`, `cloud_sql`), ordered `compute` first. Absent when no product line has coverage data.",
"items": {
"type": "object",
"description": "Trailing 30 days of CUD coverage for one product line. `compute` entries carry every cost property except `cloudSql`; `cloud_sql` entries carry only `cloudSql` and `onDemand`, so each coverage sub-type appears exactly once across the array.",
"required": [
"service",
"days"
],
"properties": {
"service": {
"type": "string",
"enum": [
"compute",
"cloud_sql"
],
"description": "Product line this coverage series belongs to."
},
"days": {
"type": "array",
"description": "Daily coverage rows, sorted ascending by `date`.",
"items": {
"type": "object",
"required": [
"date"
],
"description": "One day of CUD coverage breakdown. Money fields are wrapped objects (`{amount, currency}`). Which cost properties are present depends on the product line of the enclosing entry — `compute` rows carry every property except `cloudSql`; `cloud_sql` rows carry only `cloudSql` and `onDemand`. A property that belongs to the product line is present even when the amount is `0.00`.",
"properties": {
"date": {
"type": "string",
"format": "date",
"description": "Calendar day (UTC) for this coverage row in format YYYY-MM-DD."
},
"computeFlexible": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by Compute Flexible CUDs for the day."
},
"cloudRun": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by Cloud Run CUDs for the day."
},
"bigQuery": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by BigQuery CUDs for the day."
},
"bigtable": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by Bigtable CUDs for the day."
},
"cloudSql": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by Cloud SQL CUDs for the day."
},
"cloudFirestore": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by Cloud Firestore CUDs for the day."
},
"cloudSpanner": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by Cloud Spanner CUDs for the day."
},
"memorystoreForRedis": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by Memorystore for Redis CUDs for the day."
},
"alloyDb": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by AlloyDB CUDs for the day."
},
"backupForOracle": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by Google Cloud Backup and DR for Oracle CUDs for the day."
},
"kafka": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by Kafka CUDs for the day."
},
"resourceBased": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "Spend covered by resource-based (vCPU / memory) CUDs for the day."
},
"onDemand": {
"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).",
"example": "100.00"
},
"currency": {
"type": "string",
"pattern": "^[A-Z]{3}$",
"description": "ISO 4217 currency code.",
"example": "USD"
}
}
}
],
"description": "On-demand spend not covered by any CUD for the day."
}
}
}
}
}
}
}
}
}
]
}
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. |
| 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. |
Related
- get-gcp-recommendation — Get a GCP recommendation
- list-gcp-billing-accounts — List GCP billing accounts
- list-gcp-billing-accounts-settings — List billing account engine settings
- 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/billing-accounts/{billingAccountId}
Aliases: getgcpbillingaccount