Skip to main content

list-insight-resource-results

dci list-insight-resource-results sourceID insightKey [flags]

Returns a paginated list of individual resource-level results for a specific insight. Each resource result represents a single cloud resource (e.g. an EC2 instance, a GCS bucket) affected by the insight, along with its risk scores or potential savings.

Flags

--page-token: (string)

--max-results: (integer default:1000)

Output

Successful operation

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

FieldTypeDescription
resourceResultsarray of object
resourceResults[].resourceIdstringThe cloud resource identifier.
resourceResults[].resourceTypestringWhat the resource actually is, eg. for an EC2 resource ID, this field would be instance
resourceResults[].cloudProviderstringThe cloud provider associated with the resource.
resourceResults[].accountstringThe cloud account or project ID containing this resource.
resourceResults[].locationstringrepresents the region/zone of the resource in AWS, or equivalent for other providers
resourceResults[].resolvedbooleanWhether this resource-level issue has been resolved. Computed server-side.
resourceResults[].severitystringThe severity level of the finding. Computed server-side from the security risk counts. One of: "critical", "high", "medium", "low".
resourceResults[].externalIdstringthe external ID of the resource in the provider's system for the resource
resourceResults[].externalUrlstringthe URL to the resource-level issue in the provider's system
resourceResults[].metadataobjectcontains any additional information for the resource results
resourceResults[].enhancementobjectDoiT-managed metadata associated with a resource result.
resourceResults[].enhancement.tagsarray of stringTags assigned to this resource result.
resourceResults[].enhancement.priorityobjectPriority information for this resource result.
resourceResults[].enhancement.priority.valuestringThe priority level (e.g. Low, Medium, High).
resourceResults[].enhancement.priority.priorityScorenumber (double)Numeric priority score.
resourceResults[].enhancement.lastUpdatedBystringThe user who last updated this enhancement.
resourceResults[].enhancement.lastUpdatedAtstring (date-time)Timestamp of the last update.
resourceResults[].resultTypestringThe discriminator property that determines which fields are populated in the 'result' object. One of: "security_risk", "potential_daily_savings", "potential_daily_savings_with_recommendation", "potential_daily_savings_with_cluster_agent".
resourceResults[].resultobjectThe result data for this resource. Which fields are populated depends on the resultType. For security_risk: critical, high, medium, low. For potential_daily_savings: value. For potential_daily_savings_with_recommendation: value, current, recommendation. For potential_daily_savings_with_cluster_agent: value, agentInstalled.
resourceResults[].result.valuenumber (double)the daily saving amount for this result
resourceResults[].result.criticalintegernumber of critical security risks
resourceResults[].result.highintegernumber of high security risks
resourceResults[].result.mediumintegernumber of medium security risks
resourceResults[].result.lowintegernumber of low security risks
resourceResults[].result.currentstringthe current state (i.e. current instance type)
resourceResults[].result.recommendationstringthe recommended state (i.e. recommended instance type)
resourceResults[].result.agentInstalledbooleantrue if the agent is installed
pageTokenstring
rowCountinteger
Raw JSON schema
{
"type": "object",
"required": [
"resourceResults",
"rowCount"
],
"properties": {
"resourceResults": {
"type": "array",
"items": {
"type": "object",
"description": "A single resource-level result within an insight, as returned in API responses.",
"required": [
"resourceId",
"resultType",
"account",
"cloudProvider"
],
"properties": {
"resourceId": {
"description": "The cloud resource identifier.",
"type": "string"
},
"resourceType": {
"description": "What the resource actually is, eg. for an EC2 resource ID, this field would be `instance`",
"type": "string",
"example": "instance, disk, cache"
},
"cloudProvider": {
"type": "string",
"example": "aws",
"description": "The cloud provider associated with the resource."
},
"account": {
"type": "string",
"description": "The cloud account or project ID containing this resource."
},
"location": {
"type": "string",
"description": "represents the region/zone of the resource in AWS, or equivalent for other providers",
"example": "eu-west-2"
},
"resolved": {
"type": "boolean",
"description": "Whether this resource-level issue has been resolved. Computed server-side."
},
"severity": {
"type": "string",
"enum": [
"critical",
"high",
"medium",
"low"
],
"description": "The severity level of the finding. Computed server-side from the security risk counts."
},
"externalId": {
"type": "string",
"description": "the external ID of the resource in the provider's system for the resource"
},
"externalUrl": {
"type": "string",
"description": "the URL to the resource-level issue in the provider's system"
},
"metadata": {
"type": "object",
"description": "contains any additional information for the resource results"
},
"enhancement": {
"type": "object",
"description": "DoiT-managed metadata associated with a resource result.",
"properties": {
"tags": {
"type": "array",
"description": "Tags assigned to this resource result.",
"items": {
"type": "string"
}
},
"priority": {
"type": "object",
"description": "Priority information for this resource result.",
"properties": {
"value": {
"type": "string",
"description": "The priority level (e.g. Low, Medium, High)."
},
"priorityScore": {
"type": "number",
"format": "double",
"description": "Numeric priority score."
}
}
},
"lastUpdatedBy": {
"type": "string",
"description": "The user who last updated this enhancement."
},
"lastUpdatedAt": {
"type": "string",
"format": "date-time",
"description": "Timestamp of the last update."
}
}
},
"resultType": {
"type": "string",
"enum": [
"security_risk",
"potential_daily_savings",
"potential_daily_savings_with_recommendation",
"potential_daily_savings_with_cluster_agent"
],
"description": "The discriminator property that determines which fields are populated in the 'result' object."
},
"result": {
"description": "The result data for this resource. Which fields are populated depends on the resultType. For security_risk: critical, high, medium, low. For potential_daily_savings: value. For potential_daily_savings_with_recommendation: value, current, recommendation. For potential_daily_savings_with_cluster_agent: value, agentInstalled.\n",
"type": "object",
"properties": {
"value": {
"type": "number",
"format": "double",
"description": "the daily saving amount for this result"
},
"critical": {
"type": "integer",
"description": "number of critical security risks"
},
"high": {
"type": "integer",
"description": "number of high security risks"
},
"medium": {
"type": "integer",
"description": "number of medium security risks"
},
"low": {
"type": "integer",
"description": "number of low security risks"
},
"current": {
"type": "string",
"description": "the current state (i.e. current instance type)"
},
"recommendation": {
"type": "string",
"description": "the recommended state (i.e. recommended instance type)"
},
"agentInstalled": {
"type": "boolean",
"description": "true if the agent is installed"
}
}
}
}
}
},
"pageToken": {
"type": "string"
},
"rowCount": {
"type": "integer"
}
}
}

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 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: get-insight-resource-results