Skip to main content

list-attribute-workloads-cloud-providers

dci list-attribute-workloads-cloud-providers [body] [flags]

Returns the distinct cloud providers that billed the resources matched by the filters in a date range (resourceCloudProvider, the cloud of the billed resource, not of the cluster). Send workloadId to limit it to one workload. Use it to know which clouds a selection spans, for example before asking for hour granularity: Azure data is daily only. For the cloud of the clusters, use listAttributeWorkloadsFilterValues with platformCloudProvider.

The request body holds the filters; this operation only reads data. A workloadId that does not decode returns 404.

Freemium customers (no paid Attribute plan) see network cost only, and only for the last 60 days.

Authenticate with Authorization: Bearer <token>. Omit X-Tenant-Id when the credential resolves to one customer. When the credential can act on several customers, send X-Tenant-Id: <tenant-id> to select one.

Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.

Request​

Content-Type: application/json

FieldTypeRequiredDescription
workloadIdstringOpaque ID of one workload. Copy it unchanged from the workloadId of a workload row of queryAttributeWorkloadsTable; do not build or change it. An ID that does not decode returns 404.
filterConditionsone of 2 variantsyesThe filters, as an object with exactly one key: and (every item must match) or or (at least one item must match). Each item is a condition or a group of conditions. Send \{"and": []\} for no filter.

Example body (JSON)​

{
"filterConditions": {
"and": []
}
}
Raw JSON schema
{
"type": "object",
"required": [
"filterConditions"
],
"properties": {
"workloadId": {
"type": "string",
"minLength": 1,
"description": "Opaque ID of one workload. Copy it unchanged from the `workloadId` of a `workload` row of\n`queryAttributeWorkloadsTable`; do not build or change it. An ID that does not decode\nreturns 404."
},
"filterConditions": {
"description": "The filters, as an object with exactly one key: `and` (every item must match) or `or` (at\nleast one item must match). Each item is a condition or a group of conditions. Send\n`{\"and\": []}` for no filter.",
"oneOf": [
{
"type": "object",
"title": "All of",
"additionalProperties": false,
"required": [
"and"
],
"properties": {
"and": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"description": "One condition on one field.",
"required": [
"var",
"operator",
"values"
],
"properties": {
"var": {
"type": "object",
"required": [
"field"
],
"properties": {
"field": {
"type": "string",
"description": "A field to filter on. Get its values from `listAttributeWorkloadsFilterValues`.\n\n- `name`: workload name. `type`: workload type. `namespace`: Kubernetes namespace.\n- `platform_name`, `platform_type`, `platform_region`: the cluster's name, type and region.\n- `accountId`: the cloud account of the cluster.\n- `platformCloudProvider`: the cloud the cluster runs on.\n- `resourceName`: the billed resource's ID. `resourceType`: the billed service.\n `resourceRegion`: the resource's region.\n- `resourceAccountId`, `resourceAccountName`: the cloud account (or project) that holds\n the resource.\n- `resourceCloudProvider`: the cloud that billed the resource.\n- `costDescription`: the billing SKU description.",
"enum": [
"accountId",
"costDescription",
"name",
"namespace",
"platform_name",
"platform_region",
"platform_type",
"platformCloudProvider",
"resourceAccountId",
"resourceAccountName",
"resourceCloudProvider",
"resourceName",
"resourceRegion",
"resourceType",
"type"
]
}
}
},
"operator": {
"type": "string",
"description": "`in` / `not_in`: the field equals / does not equal one of `values` (exact match).\n`contains` / `not_contains`: the field contains / does not contain one of `values` as a\nsubstring. `exists` / `not_exists`: the field has / has no value; send `values: []`.",
"enum": [
"in",
"not_in",
"contains",
"not_contains",
"exists",
"not_exists"
]
},
"values": {
"type": "array",
"description": "The values to compare with. Send an empty array for `exists` and `not_exists`.",
"items": {
"type": "string"
}
}
}
},
{
"description": "A nested group of conditions, joined with AND or with OR. Groups cannot nest further.",
"oneOf": [
{
"type": "object",
"title": "All of",
"additionalProperties": false,
"required": [
"and"
],
"properties": {
"and": {
"type": "array",
"items": {
"type": "object",
"description": "One condition on one field.",
"required": [
"var",
"operator",
"values"
],
"properties": {
"var": {
"type": "object",
"required": [
"field"
],
"properties": {
"field": {
"type": "string",
"description": "A field to filter on. Get its values from `listAttributeWorkloadsFilterValues`.\n\n- `name`: workload name. `type`: workload type. `namespace`: Kubernetes namespace.\n- `platform_name`, `platform_type`, `platform_region`: the cluster's name, type and region.\n- `accountId`: the cloud account of the cluster.\n- `platformCloudProvider`: the cloud the cluster runs on.\n- `resourceName`: the billed resource's ID. `resourceType`: the billed service.\n `resourceRegion`: the resource's region.\n- `resourceAccountId`, `resourceAccountName`: the cloud account (or project) that holds\n the resource.\n- `resourceCloudProvider`: the cloud that billed the resource.\n- `costDescription`: the billing SKU description.",
"enum": [
"accountId",
"costDescription",
"name",
"namespace",
"platform_name",
"platform_region",
"platform_type",
"platformCloudProvider",
"resourceAccountId",
"resourceAccountName",
"resourceCloudProvider",
"resourceName",
"resourceRegion",
"resourceType",
"type"
]
}
}
},
"operator": {
"type": "string",
"description": "`in` / `not_in`: the field equals / does not equal one of `values` (exact match).\n`contains` / `not_contains`: the field contains / does not contain one of `values` as a\nsubstring. `exists` / `not_exists`: the field has / has no value; send `values: []`.",
"enum": [
"in",
"not_in",
"contains",
"not_contains",
"exists",
"not_exists"
]
},
"values": {
"type": "array",
"description": "The values to compare with. Send an empty array for `exists` and `not_exists`.",
"items": {
"type": "string"
}
}
}
}
}
}
},
{
"type": "object",
"title": "Any of",
"additionalProperties": false,
"required": [
"or"
],
"properties": {
"or": {
"type": "array",
"items": {
"type": "object",
"description": "One condition on one field.",
"required": [
"var",
"operator",
"values"
],
"properties": {
"var": {
"type": "object",
"required": [
"field"
],
"properties": {
"field": {
"type": "string",
"description": "A field to filter on. Get its values from `listAttributeWorkloadsFilterValues`.\n\n- `name`: workload name. `type`: workload type. `namespace`: Kubernetes namespace.\n- `platform_name`, `platform_type`, `platform_region`: the cluster's name, type and region.\n- `accountId`: the cloud account of the cluster.\n- `platformCloudProvider`: the cloud the cluster runs on.\n- `resourceName`: the billed resource's ID. `resourceType`: the billed service.\n `resourceRegion`: the resource's region.\n- `resourceAccountId`, `resourceAccountName`: the cloud account (or project) that holds\n the resource.\n- `resourceCloudProvider`: the cloud that billed the resource.\n- `costDescription`: the billing SKU description.",
"enum": [
"accountId",
"costDescription",
"name",
"namespace",
"platform_name",
"platform_region",
"platform_type",
"platformCloudProvider",
"resourceAccountId",
"resourceAccountName",
"resourceCloudProvider",
"resourceName",
"resourceRegion",
"resourceType",
"type"
]
}
}
},
"operator": {
"type": "string",
"description": "`in` / `not_in`: the field equals / does not equal one of `values` (exact match).\n`contains` / `not_contains`: the field contains / does not contain one of `values` as a\nsubstring. `exists` / `not_exists`: the field has / has no value; send `values: []`.",
"enum": [
"in",
"not_in",
"contains",
"not_contains",
"exists",
"not_exists"
]
},
"values": {
"type": "array",
"description": "The values to compare with. Send an empty array for `exists` and `not_exists`.",
"items": {
"type": "string"
}
}
}
}
}
}
}
]
}
]
}
}
}
},
{
"type": "object",
"title": "Any of",
"additionalProperties": false,
"required": [
"or"
],
"properties": {
"or": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"description": "One condition on one field.",
"required": [
"var",
"operator",
"values"
],
"properties": {
"var": {
"type": "object",
"required": [
"field"
],
"properties": {
"field": {
"type": "string",
"description": "A field to filter on. Get its values from `listAttributeWorkloadsFilterValues`.\n\n- `name`: workload name. `type`: workload type. `namespace`: Kubernetes namespace.\n- `platform_name`, `platform_type`, `platform_region`: the cluster's name, type and region.\n- `accountId`: the cloud account of the cluster.\n- `platformCloudProvider`: the cloud the cluster runs on.\n- `resourceName`: the billed resource's ID. `resourceType`: the billed service.\n `resourceRegion`: the resource's region.\n- `resourceAccountId`, `resourceAccountName`: the cloud account (or project) that holds\n the resource.\n- `resourceCloudProvider`: the cloud that billed the resource.\n- `costDescription`: the billing SKU description.",
"enum": [
"accountId",
"costDescription",
"name",
"namespace",
"platform_name",
"platform_region",
"platform_type",
"platformCloudProvider",
"resourceAccountId",
"resourceAccountName",
"resourceCloudProvider",
"resourceName",
"resourceRegion",
"resourceType",
"type"
]
}
}
},
"operator": {
"type": "string",
"description": "`in` / `not_in`: the field equals / does not equal one of `values` (exact match).\n`contains` / `not_contains`: the field contains / does not contain one of `values` as a\nsubstring. `exists` / `not_exists`: the field has / has no value; send `values: []`.",
"enum": [
"in",
"not_in",
"contains",
"not_contains",
"exists",
"not_exists"
]
},
"values": {
"type": "array",
"description": "The values to compare with. Send an empty array for `exists` and `not_exists`.",
"items": {
"type": "string"
}
}
}
},
{
"description": "A nested group of conditions, joined with AND or with OR. Groups cannot nest further.",
"oneOf": [
{
"type": "object",
"title": "All of",
"additionalProperties": false,
"required": [
"and"
],
"properties": {
"and": {
"type": "array",
"items": {
"type": "object",
"description": "One condition on one field.",
"required": [
"var",
"operator",
"values"
],
"properties": {
"var": {
"type": "object",
"required": [
"field"
],
"properties": {
"field": {
"type": "string",
"description": "A field to filter on. Get its values from `listAttributeWorkloadsFilterValues`.\n\n- `name`: workload name. `type`: workload type. `namespace`: Kubernetes namespace.\n- `platform_name`, `platform_type`, `platform_region`: the cluster's name, type and region.\n- `accountId`: the cloud account of the cluster.\n- `platformCloudProvider`: the cloud the cluster runs on.\n- `resourceName`: the billed resource's ID. `resourceType`: the billed service.\n `resourceRegion`: the resource's region.\n- `resourceAccountId`, `resourceAccountName`: the cloud account (or project) that holds\n the resource.\n- `resourceCloudProvider`: the cloud that billed the resource.\n- `costDescription`: the billing SKU description.",
"enum": [
"accountId",
"costDescription",
"name",
"namespace",
"platform_name",
"platform_region",
"platform_type",
"platformCloudProvider",
"resourceAccountId",
"resourceAccountName",
"resourceCloudProvider",
"resourceName",
"resourceRegion",
"resourceType",
"type"
]
}
}
},
"operator": {
"type": "string",
"description": "`in` / `not_in`: the field equals / does not equal one of `values` (exact match).\n`contains` / `not_contains`: the field contains / does not contain one of `values` as a\nsubstring. `exists` / `not_exists`: the field has / has no value; send `values: []`.",
"enum": [
"in",
"not_in",
"contains",
"not_contains",
"exists",
"not_exists"
]
},
"values": {
"type": "array",
"description": "The values to compare with. Send an empty array for `exists` and `not_exists`.",
"items": {
"type": "string"
}
}
}
}
}
}
},
{
"type": "object",
"title": "Any of",
"additionalProperties": false,
"required": [
"or"
],
"properties": {
"or": {
"type": "array",
"items": {
"type": "object",
"description": "One condition on one field.",
"required": [
"var",
"operator",
"values"
],
"properties": {
"var": {
"type": "object",
"required": [
"field"
],
"properties": {
"field": {
"type": "string",
"description": "A field to filter on. Get its values from `listAttributeWorkloadsFilterValues`.\n\n- `name`: workload name. `type`: workload type. `namespace`: Kubernetes namespace.\n- `platform_name`, `platform_type`, `platform_region`: the cluster's name, type and region.\n- `accountId`: the cloud account of the cluster.\n- `platformCloudProvider`: the cloud the cluster runs on.\n- `resourceName`: the billed resource's ID. `resourceType`: the billed service.\n `resourceRegion`: the resource's region.\n- `resourceAccountId`, `resourceAccountName`: the cloud account (or project) that holds\n the resource.\n- `resourceCloudProvider`: the cloud that billed the resource.\n- `costDescription`: the billing SKU description.",
"enum": [
"accountId",
"costDescription",
"name",
"namespace",
"platform_name",
"platform_region",
"platform_type",
"platformCloudProvider",
"resourceAccountId",
"resourceAccountName",
"resourceCloudProvider",
"resourceName",
"resourceRegion",
"resourceType",
"type"
]
}
}
},
"operator": {
"type": "string",
"description": "`in` / `not_in`: the field equals / does not equal one of `values` (exact match).\n`contains` / `not_contains`: the field contains / does not contain one of `values` as a\nsubstring. `exists` / `not_exists`: the field has / has no value; send `values: []`.",
"enum": [
"in",
"not_in",
"contains",
"not_contains",
"exists",
"not_exists"
]
},
"values": {
"type": "array",
"description": "The values to compare with. Send an empty array for `exists` and `not_exists`.",
"items": {
"type": "string"
}
}
}
}
}
}
}
]
}
]
}
}
}
}
],
"example": {
"and": [
{
"var": {
"field": "namespace"
},
"operator": "in",
"values": [
"checkout"
]
},
{
"or": [
{
"var": {
"field": "platformCloudProvider"
},
"operator": "in",
"values": [
"AWS"
]
},
{
"var": {
"field": "resourceType"
},
"operator": "contains",
"values": [
"Storage"
]
}
]
}
]
}
}
},
"example": {
"filterConditions": {
"and": []
}
}
}

Flags​

FlagTypeDefaultExampleDescription
--fromstring (date)2026-09-01First day of the date range (UTC), inclusive, as YYYY-MM-DD. The change fields compare with the period of the same length right before this day. Freemium customers (no paid Attribute plan) can only read the last 60 days: a from earlier than today minus 60 days (UTC) returns 403.
--tostring (date)2026-09-30Last day of the date range (UTC), inclusive, as YYYY-MM-DD. Must be on or after from.
--limitinteger50Maximum number of values to return, from 1 to 1000.

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

Output​

OK - Distinct cloud provider values.

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

FieldTypeDescription
valuesarray of string
Raw JSON schema
{
"type": "object",
"required": [
"values"
],
"properties": {
"values": {
"type": "array",
"items": {
"type": "string"
}
}
}
}

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.
40921RESOURCE_CONFLICTThe operation conflicts with the resource's current state.
500, 502, 50340API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: listattributeworkloadscloudproviders