dependency_tree¶
Category graph · sensitivity confidential · capabilities read_state · readOnly true, destructive false, idempotent true, openWorld false · outputSchema no · timeout: layer default (300 s)
The nested upstream and downstream tree of one asset, the view cloudg deps prints. direction picks depends_on, dependents or both. Each node has id, name, type, account_id, via, relationship and children. include_hierarchy adds organization and account containment edges. The tree is cut to max_nodes nodes depth-first in list order; truncated is true only when nodes were actually left out.
| Argument | Type | Default | Constraints | Description |
|---|---|---|---|---|
ref |
string | required | min length 1 | Asset reference: internal id, ARN / cloud resource id, unique name, or unique ARN tail (e.g. 'function:api' or 'i-0abc'). |
direction |
string | "both" |
one of up, down, both |
up = what it depends on, down = what depends on it. |
max_depth |
integer | 3 |
1..6 | Depth of the tree in each direction. |
include_hierarchy |
boolean | false |
Include org / account containment edges. | |
max_nodes |
integer | 200 |
1..1000 | Node budget across both trees; pruning is depth-first in list order. |
dataset |
string | "" |
Dataset name (see list_datasets). Empty = the active dataset. |
Called with the arguments below, dependency_tree returned this structuredContent.
{
"dataset": "sample",
"asset": {
"id": "api-handler",
"name": "api-handler",
"arn": "arn:aws:lambda:us-east-1:111111111111:function:api-handler",
"type": "LAMBDA_FUNCTION",
"account_id": "111111111111",
"region": "us-east-1"
},
"depends_on": [
{
"id": "api-gw",
"name": "public-api",
"arn": "arn:aws:apigateway:us-east-1::/restapis/a1b2c3",
"type": "API_GATEWAY",
"account_id": "111111111111",
"region": "us-east-1",
"via": "INVOKES",
"relationship": null,
"children": []
},
{
"id": "data-bucket",
"name": "prod-data",
"arn": "arn:aws:s3:::prod-data",
"type": "S3_BUCKET",
"account_id": "111111111111",
"region": "us-east-1",
"via": "INVOKES",
"relationship": "TRIGGERED_BY",
"children": []
},
"... 4 more"
],
"dependents": [],
"truncated": false
}
Called with the arguments below, dependency_tree returned this structuredContent.
{
"dataset": "sample",
"asset": {
"id": "kms-main",
"name": "prod-main-key",
"arn": "arn:aws:kms:us-east-1:111111111111:key/1111-2222",
"type": "KMS_KEY",
"account_id": "111111111111",
"region": "us-east-1"
},
"dependents": [
{
"id": "api-handler",
"name": "api-handler",
"arn": "arn:aws:lambda:us-east-1:111111111111:function:api-handler",
"type": "LAMBDA_FUNCTION",
"account_id": "111111111111",
"region": "us-east-1",
"via": "REFERENCES",
"relationship": "ENCRYPTED_BY_KMS",
"children": []
},
{
"id": "data-bucket",
"name": "prod-data",
"arn": "arn:aws:s3:::prod-data",
"type": "S3_BUCKET",
"account_id": "111111111111",
"region": "us-east-1",
"via": "REFERENCES",
"relationship": "ENCRYPTED_BY_KMS",
"children": []
}
],
"truncated": true
}