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

list-assets

dci list-assets [flags]

Returns a list of all available customer assets, such as Google Cloud billing accounts, G Suite/Workspace subscriptions, etc. Assets are returned in reverse chronological order by default.

CLI default view

dci list-assets presents a curated table by default:

  • Columns: name (a clickable link to the asset in the DoiT console in interactive terminals), type, and created (UTC) (from createTime).
  • In interactive tables, created (UTC) renders in your local timezone and is titled created (local); machine formats, agent mode, and --utc keep UTC — see Timestamps and timezones.
  • --output json and explicit -C/--fields selections return the raw fields documented below.

Examples

# The customer's assets, newest first.
dci list-assets
# Only Google Workspace subscriptions.
dci list-assets --filter type:g-suite
# Google Cloud and AWS assets (the same key twice means OR).
dci list-assets --filter "type:google-cloud|type:amazon-web-services"
# Every page with IDs, for scripts.
dci list-assets --all --output json

Flags

FlagTypeDefaultExampleDescription
--max-resultsinteger (int64)50The maximum number of results to return in a single page. Leverage the page tokens to iterate through the entire collection.
--page-tokenstringPage token, returned by a previous call, to request the next page of results
--filterstringAn expression for filtering the results of the request. The syntax is key:[<value>]. e.g: "type:g-suite". Multiple filters can be connected using a pipe |. Note that using different keys in the same filter results in “AND,” while using the same key multiple times in the same filter results in “OR”.

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

Output

OK - List of available assets returned.

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

FieldTypeDescription
assetsarray of objectArray of Assets
assets[].createTimeinteger (int64)The time when the asset was created, in milliseconds since the epoch.
assets[].idstringThe unique identifier of the asset.
assets[].namestringA human-readable label for the asset, typically combining the product name and domain or account ID.
assets[].quantityinteger (int64)The number of licenses or seats currently assigned to this asset.
assets[].typestringThe asset type, e.g. g-suite, office-365, google-cloud, amazon-web-services, or microsoft-azure.
assets[].urlstringA link to the asset details page in the DoiT console.
pageTokenstringPage token. Can be used to request the next page of results.
rowCountinteger (int64)Assets rows count
Raw JSON schema
{
"type": "object",
"properties": {
"assets": {
"type": "array",
"description": "Array of Assets",
"items": {
"type": "object",
"description": "Summary information about a single asset.",
"properties": {
"createTime": {
"type": "integer",
"description": "The time when the asset was created, in milliseconds since the epoch.",
"format": "int64"
},
"id": {
"type": "string",
"description": "The unique identifier of the asset."
},
"name": {
"type": "string",
"description": "A human-readable label for the asset, typically combining the product name and domain or account ID."
},
"quantity": {
"type": "integer",
"description": "The number of licenses or seats currently assigned to this asset.",
"format": "int64"
},
"type": {
"type": "string",
"description": "The asset type, e.g. g-suite, office-365, google-cloud, amazon-web-services, or microsoft-azure."
},
"url": {
"type": "string",
"description": "A link to the asset details page in the DoiT console."
}
}
}
},
"pageToken": {
"type": "string",
"description": "Page token. Can be used to request the next page of results."
},
"rowCount": {
"type": "integer",
"description": "Assets rows count",
"format": "int64"
}
}
}

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.

Aliases: id-of-assets